[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.189.192.193: ~ $
�

�f ���dZddlmZddlmZddlmZmZmZd�Z	d�Z
d�Zd�Zd	�Z
d
�ZGd�dej��Zd
S)a�Fixer for __metaclass__ = X -> (metaclass=X) methods.

   The various forms of classef (inherits nothing, inherits once, inherits
   many) don't parse the same in the CST so we look at ALL classes for
   a __metaclass__ and if we find one normalize the inherits to all be
   an arglist.

   For one-liner classes ('class X: pass') there is no indent/dedent so
   we normalize those into having a suite.

   Moving the __metaclass__ into the classdef can also cause the class
   body to be empty so there is some special casing for that as well.

   This fixer also tries very hard to keep original indenting and spacing
   in all those corner cases.

�)�
fixer_base)�token)�syms�Node�Leafc�P�|jD]�}|jtjkrt	|��cS|jtjkr`|jrY|jd}|jtjkr7|jr0|jd}t|t��r|j	dkrdS��dS)z� we have to check the cls_node without changing it.
        There are two possibilities:
          1)  clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
          2)  clsdef => simple_stmt => expr_stmt => Leaf('__meta')
    ��
__metaclass__TF)
�children�typer�suite�
has_metaclass�simple_stmt�	expr_stmt�
isinstancer�value)�parent�node�	expr_node�	left_sides    �B/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_metaclass.pyrrs�����	 �	 ���9��
�"�"� ��&�&�&�&�&�
�Y�$�*�
*�
*�t�}�
*��
�a�(�I��~���/�/�I�4F�/�%�.�q�1�	��i��.�.� �!��?�:�:��4�4���5�c�
�|jD]}|jtjkrdS�t	|j��D]\}}|jt
jkrn�td���ttjg��}|j|dzd�r]|j|dz}|�	|�
����|���|j|dzd��]|�	|��|}dS)zf one-line classes don't get a suite in the parse tree so we add
        one to normalize the tree
    NzNo class suite and no ':'!�)rrrr
�	enumerater�COLON�
ValueErrorr�append_child�clone�remove)�cls_noder�ir
�	move_nodes     r�fixup_parse_treer$-s ���!�����9��
�"�"��F�F�#�
�X�.�/�/�7�7���4��9���#�#��E�$��5�6�6�6�
���R� � �E�
�
�A�a�C�D�D�
!���%�a��c�*�	�
���9�?�?�,�,�-�-�-��������
�A�a�C�D�D�
!��
���%� � � ��D�D�Drc�n�t|j��D]\}}|jtjkrn�dS|���t
tjg��}t
tj	|g��}|j|d�rW|j|}|�
|�����|���|j|d��W|�||��|jdjd}|jdjd}	|	j
|_
dS)z� if there is a semi-colon all the parts count as part of the same
        simple_stmt.  We just want the __metaclass__ part so we move
        everything after the semi-colon into its own simple_stmt node
    Nr	)rrrr�SEMIr rrrrrr�insert_child�prefix)
rr"�	stmt_node�semi_indr�new_expr�new_stmtr#�	new_leaf1�	old_leaf1s
          r�fixup_simple_stmtr/Gs.��
$�I�$6�7�7�����$��9��
�"�"��E�#�	���K�K�M�M�M��D�N�B�'�'�H��D�$�x�j�1�1�H�
�
�X�Y�Y�
'���&�x�0�	����i�o�o�/�/�0�0�0��������
�X�Y�Y�
'������8�$�$�$��!�!�$�-�a�0�I��"�1�%�.�q�1�I� �'�I���rc��|jrA|jdjtjkr#|jd���dSdSdS)N���)rrr�NEWLINEr )rs r�remove_trailing_newliner3_sQ���}�#���r�*�/�5�=�@�@��
�b�� � �"�"�"�"�"�#�#�@�@rc#��K�|jD]}|jtjkrn�t	d���tt
|j����D]�\}}|jtjkr�|jr}|jd}|jtjkr[|jrT|jd}t|t��r2|jdkr't|||��t|��|||fV���dS)NzNo class suite!r	r
)rrrr
r�listrrrrrrr/r3)r!rr"�simple_noder�	left_nodes      r�
find_metasr8ds�����!�,�,���9��
�"�"��E�#��*�+�+�+��y���7�7�8�8�1�1���;���t�/�/�/�K�4H�/�#�,�Q�/�I��~���/�/�I�4F�/�%�.�q�1�	��i��.�.�1�!��?�:�:�%�d�A�{�;�;�;�+�K�8�8�8���K�0�0�0�0��1�1rc�p�|jddd�}|r,|���}|jtjkrn|�,|ru|���}t|t��r%|jtjkr|jrd|_dS|�	|jddd���|�sdSdS)z� If an INDENT is followed by a thing with a prefix then nuke the prefix
        Otherwise we get in trouble when removing __metaclass__ at suite start
    Nr1�)
r�poprr�INDENTrr�DEDENTr(�extend)r
�kidsrs   r�fixup_indentr@{s����>�$�$�B�$��D�
���x�x�z�z���9���$�$�����-��x�x�z�z���d�D�!�!�	-�d�i�5�<�&?�&?��{�
!� ����F��K�K��
�d�d��d�+�,�,�,��-�-�-�-�-rc��eZdZdZdZd�ZdS)�FixMetaclassTz
    classdef<any*>
    c��t|��sdSt|��d}t|��D]\}}}|}|����|jdj}t
|j��dkr�|jdjtjkr|jd}�nN|jd�	��}	ttj|	g��}|�d|��n�t
|j��dkr1ttjg��}|�d|��n�t
|j��dkr�ttjg��}|�dttjd����|�d|��|�dttjd����nt#d	���|jdjd}
d
|
_|
j}|jr5|�ttjd����d|
_nd
|
_|jd}d
|jd_d
|jd_|�|��t-|��|jso|���t|d��}
||
_|�|
��|�ttjd����dSt
|j��dkr�|jdjtjkrx|jdjtjkrZt|d��}
|�d|
��|�dttjd����dSdSdSdS)Nr	����r�)�(zUnexpected class definition�	metaclass�,� r:r�pass�
���r1)rr$r8r rr�lenr�arglistrr�	set_childr'rr�RPAR�LPARrrr(r�COMMAr@r2r<r=)�selfr�results�last_metaclassr
r"�stmt�	text_typerQr�meta_txt�orig_meta_prefixr�	pass_leafs              r�	transformzFixMetaclass.transform�s����T�"�"�	��F��������(��.�.�	�	�N�E�1�d�!�N��K�K�M�M�M�M��M�!�$�)�	��t�}����"�"��}�Q��$���4�4��-��*�����q�)�/�/�1�1���t�|�f�X�6�6�����q�'�*�*�*�*�
���
�
�1�
$�
$��4�<��,�,�G����a��)�)�)�)�
���
�
�1�
$�
$��4�<��,�,�G����a��e�j�#�!6�!6�7�7�7����a��)�)�)����a��e�j�#�!6�!6�7�7�7�7��:�;�;�;�"�*�1�-�6�q�9��$���#�?����	!�� � ��e�k�3�!7�!7�8�8�8�!�H�O�O� �H�O�#�+�A�.�	�')�	��1��$�')�	��1��$����^�,�,�,��U�����~�	>��L�L�N�N�N��Y��/�/�I�/�I�����i�(�(�(����d�5�=�$�7�7�8�8�8�8�8�
���
 �
 �1�
$�
$��.��$�)�U�\�9�9��.��$�)�U�\�9�9��Y��/�/�I����r�9�-�-�-����r�4��
�t�#<�#<�=�=�=�=�=�
%�
$�9�9�9�9rN)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNr^�rrrBrB�s4�������M��G�L>�L>�L>�L>�L>rrBN)�__doc__r:r�pygramr�
fixer_utilrrrrr$r/r3r8r@�BaseFixrBrdrr�<module>ris�����(������������)�)�)�)�)�)�)�)�)�)����&���4(�(�(�0#�#�#�
1�1�1�.-�-�-�,S>�S>�S>�S>�S>�:�%�S>�S>�S>�S>�S>r

Filemanager

Name Type Size Permission Actions
__init__.cpython-311.opt-1.pyc File 170 B 0644
__init__.cpython-311.opt-2.pyc File 170 B 0644
__init__.cpython-311.pyc File 170 B 0644
fix_apply.cpython-311.opt-1.pyc File 2.76 KB 0644
fix_apply.cpython-311.opt-2.pyc File 2.67 KB 0644
fix_apply.cpython-311.pyc File 2.77 KB 0644
fix_asserts.cpython-311.opt-1.pyc File 1.72 KB 0644
fix_asserts.cpython-311.opt-2.pyc File 1.65 KB 0644
fix_asserts.cpython-311.pyc File 1.72 KB 0644
fix_basestring.cpython-311.opt-1.pyc File 886 B 0644
fix_basestring.cpython-311.opt-2.pyc File 842 B 0644
fix_basestring.cpython-311.pyc File 886 B 0644
fix_buffer.cpython-311.opt-1.pyc File 1.08 KB 0644
fix_buffer.cpython-311.opt-2.pyc File 1.01 KB 0644
fix_buffer.cpython-311.pyc File 1.08 KB 0644
fix_dict.cpython-311.opt-1.pyc File 4.81 KB 0644
fix_dict.cpython-311.opt-2.pyc File 3.94 KB 0644
fix_dict.cpython-311.pyc File 4.93 KB 0644
fix_except.cpython-311.opt-1.pyc File 4.69 KB 0644
fix_except.cpython-311.opt-2.pyc File 4.25 KB 0644
fix_except.cpython-311.pyc File 4.69 KB 0644
fix_exec.cpython-311.opt-1.pyc File 1.78 KB 0644
fix_exec.cpython-311.opt-2.pyc File 1.62 KB 0644
fix_exec.cpython-311.pyc File 1.8 KB 0644
fix_execfile.cpython-311.opt-1.pyc File 3.12 KB 0644
fix_execfile.cpython-311.opt-2.pyc File 3 KB 0644
fix_execfile.cpython-311.pyc File 3.14 KB 0644
fix_exitfunc.cpython-311.opt-1.pyc File 3.86 KB 0644
fix_exitfunc.cpython-311.opt-2.pyc File 3.79 KB 0644
fix_exitfunc.cpython-311.pyc File 3.86 KB 0644
fix_filter.cpython-311.opt-1.pyc File 3.97 KB 0644
fix_filter.cpython-311.opt-2.pyc File 3.52 KB 0644
fix_filter.cpython-311.pyc File 3.97 KB 0644
fix_funcattrs.cpython-311.opt-1.pyc File 1.29 KB 0644
fix_funcattrs.cpython-311.opt-2.pyc File 1.23 KB 0644
fix_funcattrs.cpython-311.pyc File 1.29 KB 0644
fix_future.cpython-311.opt-1.pyc File 1023 B 0644
fix_future.cpython-311.opt-2.pyc File 919 B 0644
fix_future.cpython-311.pyc File 1023 B 0644
fix_getcwdu.cpython-311.opt-1.pyc File 1.06 KB 0644
fix_getcwdu.cpython-311.opt-2.pyc File 1016 B 0644
fix_getcwdu.cpython-311.pyc File 1.06 KB 0644
fix_has_key.cpython-311.opt-1.pyc File 4.36 KB 0644
fix_has_key.cpython-311.opt-2.pyc File 3.8 KB 0644
fix_has_key.cpython-311.pyc File 4.37 KB 0644
fix_idioms.cpython-311.opt-1.pyc File 5.83 KB 0644
fix_idioms.cpython-311.opt-2.pyc File 5.35 KB 0644
fix_idioms.cpython-311.pyc File 5.95 KB 0644
fix_import.cpython-311.opt-1.pyc File 4.7 KB 0644
fix_import.cpython-311.opt-2.pyc File 4.4 KB 0644
fix_import.cpython-311.pyc File 4.7 KB 0644
fix_imports.cpython-311.opt-1.pyc File 6.8 KB 0644
fix_imports.cpython-311.opt-2.pyc File 6.74 KB 0644
fix_imports.cpython-311.pyc File 6.8 KB 0644
fix_imports2.cpython-311.opt-1.pyc File 700 B 0644
fix_imports2.cpython-311.opt-2.pyc File 598 B 0644
fix_imports2.cpython-311.pyc File 700 B 0644
fix_input.cpython-311.opt-1.pyc File 1.38 KB 0644
fix_input.cpython-311.opt-2.pyc File 1.31 KB 0644
fix_input.cpython-311.pyc File 1.38 KB 0644
fix_intern.cpython-311.opt-1.pyc File 1.49 KB 0644
fix_intern.cpython-311.opt-2.pyc File 1.42 KB 0644
fix_intern.cpython-311.pyc File 1.49 KB 0644
fix_isinstance.cpython-311.opt-1.pyc File 2.44 KB 0644
fix_isinstance.cpython-311.opt-2.pyc File 2.13 KB 0644
fix_isinstance.cpython-311.pyc File 2.44 KB 0644
fix_itertools.cpython-311.opt-1.pyc File 2.1 KB 0644
fix_itertools.cpython-311.opt-2.pyc File 1.75 KB 0644
fix_itertools.cpython-311.pyc File 2.1 KB 0644
fix_itertools_imports.cpython-311.opt-1.pyc File 2.66 KB 0644
fix_itertools_imports.cpython-311.opt-2.pyc File 2.58 KB 0644
fix_itertools_imports.cpython-311.pyc File 2.73 KB 0644
fix_long.cpython-311.opt-1.pyc File 993 B 0644
fix_long.cpython-311.opt-2.pyc File 928 B 0644
fix_long.cpython-311.pyc File 993 B 0644
fix_map.cpython-311.opt-1.pyc File 4.73 KB 0644
fix_map.cpython-311.opt-2.pyc File 3.95 KB 0644
fix_map.cpython-311.pyc File 4.73 KB 0644
fix_metaclass.cpython-311.opt-1.pyc File 10.45 KB 0644
fix_metaclass.cpython-311.opt-2.pyc File 9.13 KB 0644
fix_metaclass.cpython-311.pyc File 10.52 KB 0644
fix_methodattrs.cpython-311.opt-1.pyc File 1.27 KB 0644
fix_methodattrs.cpython-311.opt-2.pyc File 1.19 KB 0644
fix_methodattrs.cpython-311.pyc File 1.27 KB 0644
fix_ne.cpython-311.opt-1.pyc File 1.11 KB 0644
fix_ne.cpython-311.opt-2.pyc File 1.06 KB 0644
fix_ne.cpython-311.pyc File 1.11 KB 0644
fix_next.cpython-311.opt-1.pyc File 5.1 KB 0644
fix_next.cpython-311.opt-2.pyc File 5.04 KB 0644
fix_next.cpython-311.pyc File 5.12 KB 0644
fix_nonzero.cpython-311.opt-1.pyc File 1.19 KB 0644
fix_nonzero.cpython-311.opt-2.pyc File 1.13 KB 0644
fix_nonzero.cpython-311.pyc File 1.19 KB 0644
fix_numliterals.cpython-311.opt-1.pyc File 1.59 KB 0644
fix_numliterals.cpython-311.opt-2.pyc File 1.53 KB 0644
fix_numliterals.cpython-311.pyc File 1.59 KB 0644
fix_operator.cpython-311.opt-1.pyc File 6.12 KB 0644
fix_operator.cpython-311.opt-2.pyc File 5.65 KB 0644
fix_operator.cpython-311.pyc File 6.12 KB 0644
fix_paren.cpython-311.opt-1.pyc File 1.75 KB 0644
fix_paren.cpython-311.opt-2.pyc File 1.62 KB 0644
fix_paren.cpython-311.pyc File 1.75 KB 0644
fix_print.cpython-311.opt-1.pyc File 3.88 KB 0644
fix_print.cpython-311.opt-2.pyc File 3.6 KB 0644
fix_print.cpython-311.pyc File 4.05 KB 0644
fix_raise.cpython-311.opt-1.pyc File 3.69 KB 0644
fix_raise.cpython-311.opt-2.pyc File 3.08 KB 0644
fix_raise.cpython-311.pyc File 3.69 KB 0644
fix_raw_input.cpython-311.opt-1.pyc File 1.06 KB 0644
fix_raw_input.cpython-311.opt-2.pyc File 1020 B 0644
fix_raw_input.cpython-311.pyc File 1.06 KB 0644
fix_reduce.cpython-311.opt-1.pyc File 1.32 KB 0644
fix_reduce.cpython-311.opt-2.pyc File 1.2 KB 0644
fix_reduce.cpython-311.pyc File 1.32 KB 0644
fix_reload.cpython-311.opt-1.pyc File 1.5 KB 0644
fix_reload.cpython-311.opt-2.pyc File 1.43 KB 0644
fix_reload.cpython-311.pyc File 1.5 KB 0644
fix_renames.cpython-311.opt-1.pyc File 3.29 KB 0644
fix_renames.cpython-311.opt-2.pyc File 3.21 KB 0644
fix_renames.cpython-311.pyc File 3.29 KB 0644
fix_repr.cpython-311.opt-1.pyc File 1.22 KB 0644
fix_repr.cpython-311.opt-2.pyc File 1.16 KB 0644
fix_repr.cpython-311.pyc File 1.22 KB 0644
fix_set_literal.cpython-311.opt-1.pyc File 2.7 KB 0644
fix_set_literal.cpython-311.opt-2.pyc File 2.63 KB 0644
fix_set_literal.cpython-311.pyc File 2.7 KB 0644
fix_standarderror.cpython-311.opt-1.pyc File 947 B 0644
fix_standarderror.cpython-311.opt-2.pyc File 894 B 0644
fix_standarderror.cpython-311.pyc File 947 B 0644
fix_sys_exc.cpython-311.opt-1.pyc File 2.2 KB 0644
fix_sys_exc.cpython-311.opt-2.pyc File 2.03 KB 0644
fix_sys_exc.cpython-311.pyc File 2.2 KB 0644
fix_throw.cpython-311.opt-1.pyc File 2.84 KB 0644
fix_throw.cpython-311.opt-2.pyc File 2.61 KB 0644
fix_throw.cpython-311.pyc File 2.84 KB 0644
fix_tuple_params.cpython-311.opt-1.pyc File 8.47 KB 0644
fix_tuple_params.cpython-311.opt-2.pyc File 8.14 KB 0644
fix_tuple_params.cpython-311.pyc File 8.47 KB 0644
fix_types.cpython-311.opt-1.pyc File 2.46 KB 0644
fix_types.cpython-311.opt-2.pyc File 2 KB 0644
fix_types.cpython-311.pyc File 2.46 KB 0644
fix_unicode.cpython-311.opt-1.pyc File 2.49 KB 0644
fix_unicode.cpython-311.opt-2.pyc File 2.31 KB 0644
fix_unicode.cpython-311.pyc File 2.49 KB 0644
fix_urllib.cpython-311.opt-1.pyc File 10.19 KB 0644
fix_urllib.cpython-311.opt-2.pyc File 9.67 KB 0644
fix_urllib.cpython-311.pyc File 10.19 KB 0644
fix_ws_comma.cpython-311.opt-1.pyc File 1.61 KB 0644
fix_ws_comma.cpython-311.opt-2.pyc File 1.43 KB 0644
fix_ws_comma.cpython-311.pyc File 1.61 KB 0644
fix_xrange.cpython-311.opt-1.pyc File 4.12 KB 0644
fix_xrange.cpython-311.opt-2.pyc File 4.06 KB 0644
fix_xrange.cpython-311.pyc File 4.12 KB 0644
fix_xreadlines.cpython-311.opt-1.pyc File 1.57 KB 0644
fix_xreadlines.cpython-311.opt-2.pyc File 1.45 KB 0644
fix_xreadlines.cpython-311.pyc File 1.57 KB 0644
fix_zip.cpython-311.opt-1.pyc File 2.31 KB 0644
fix_zip.cpython-311.opt-2.pyc File 1.99 KB 0644
fix_zip.cpython-311.pyc File 2.31 KB 0644