AlkantarClanX12

Your IP : 18.218.95.236


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/ast.cpython-312.opt-2.pyc

�

�Q�f����	ddlZddlZddl�ddlmZmZddlmZmZm	Z	dOddd�d�Z
d�ZdPdd	�d
�Zd�Z
d�ZdQd�Zd�Zd�ZdRd�Zej&d�ZdSd�Zd�Zdd�d�Zd�ZGd�de�ZGd�de�ZdZdZeed�s(d�Z d �Z!d!�Z"d"�Z#e$e e!�e_%e$e"e#�e_&Gd#�d$e'�Z(d%�Z)Gd&�d'ee(�(�Z*Gd)�d*ee(�(�Z+Gd+�d,ee(�(�Z,Gd-�d.ee(�(�Z-Gd/�d0ee(�(�Z.e.Z/e*e0e1e2fe+e3fe,e4fe-e'd�e5fe.e'd1�fiZ6e*e5fiZ7e5d.e'd�d.e0d'e1d'e2d'e3d*e4d,e'd1�d0iZ8Gd2�d3e9�Z:Gd4�d5e:�Z;Gd6�d7e:�Z<ee=d8�sd9�Z>d:�Z?e$e>e?�e=_@Gd;�d<eA�ZBGd=�d>eC�ZDGd?�d@eC�ZEGdA�dBeC�ZFdCeGej�j�d
z�zZJe	e�GdD�dE��ZKdFZLdGZMgeL�eM��ZNGdH�dIe�ZOdJ�ZPdKD�cic]}|eQ�j�|���c}ZSdL�ZTdM�ZUeVdNk(reU�yycc}w)T�N)�*)�contextmanager�nullcontext)�IntEnum�auto�_simple_enumF)�
type_comments�feature_versionc��	t}|r	|tz}|�d}n*t|t�r|\}}|dk7rt	d|����|}t|||||��S)N����zUnsupported major version: )�_feature_version)�
PyCF_ONLY_AST�PyCF_TYPE_COMMENTS�
isinstance�tuple�
ValueError�compile)�source�filename�moder	r
�flags�major�minors        �*/opt/alt/python312/lib64/python3.12/ast.py�parser"sq���

�E��
�#�#������	�O�U�	+�&���u��A�:��:�5�'�B�C�C����6�8�T�5�$3�5�5�c�������	t|t�rt|jd�d��}t|t�r|j
}d���fd���fd������fd���|�S)Nz 	�eval�rc�V�d}t|dd�x}r|d|��z
}t|d|��z��)Nzmalformed node or string�linenoz	 on line �: )�getattrr)�node�msg�lnos   r�_raise_malformed_nodez+literal_eval.<locals>._raise_malformed_nodeEsB��(���$��$�/�/�3�/��Y�s�e�$�$�C����D�8�}�,�-�-rc���t|t�r&t|j�tt
tfvr�|�|jS�N)r�Constant�type�value�int�float�complex)r%r(s �r�_convert_numz"literal_eval.<locals>._convert_numJs7����$��)�T�$�*�*�-=�c�5�RY�EZ�-Z�!�$�'��z�z�rc����t|t�rRt|jttf�r2�|j
�}t|jt�r|�S|S�|�Sr*)r�UnaryOp�op�UAdd�USub�operand)r%r7r1s  �r�_convert_signed_numz)literal_eval.<locals>._convert_signed_numNsU����d�G�$��D�G�G�d�D�\�)J�"�4�<�<�0�G��$�'�'�4�(� �y� � �y� ��D�!�!rc	�|��t|t�r|jSt|t�rt	t�|j��St|t�rtt�|j��St|t�rtt�|j��St|t�r]t|jt�rC|jjdk(r*|j|j cxk(rgk(rt�St|t"�rpt%|j&�t%|j(�k7r�|�t+t-t�|j&�t�|j(���St|t.�r�t|j0t2t4f�rn�|j6�}�|j8�}t|t:t<f�r4t|t>�r$t|j0t2�r||zS||z
S�|�S)N�set) rr+r-�Tupler�map�elts�List�list�Setr:�Call�func�Name�id�args�keywords�Dict�len�keys�values�dict�zip�BinOpr4�Add�Sub�left�rightr.r/r0)r%rPrQ�_convertr1r8r(s   ����rrRzliteral_eval.<locals>._convertVs�����d�H�%��:�:��
��e�
$���X�t�y�y�1�2�2�
��d�
#���H�d�i�i�0�1�1�
��c�
"��s�8�T�Y�Y�/�0�0���t�$��D�I�I�t�)D��i�i�l�l�e�#��	�	�T�]�]�(H�b�(H��5�L�)I�
��d�
#��4�9�9�~��T�[�[�!1�1�%�d�+���C��$�)�)�4���$�+�+�6�8�9�
9�
��e�
$��D�G�G�c�3�Z�)H�&�t�y�y�1�D� ����,�E��$��e��-�*�U�G�2L��d�g�g�s�+��%�<�'��%�<�'�"�4�(�(r)r�strr�lstrip�
Expression�body)�node_or_stringrRr1r8r(s @@@@r�literal_evalrX8sa�����.�#�&��~�4�4�U�;�&�I���.�*�-�'�,�,��.�
�"�)�4�N�#�#r)�indentc�������	d����fd�	�t|t�s"td|jjz����t�t
�sd�z��|�dS)Nrc��������dz
�d��zz}d��zz}nd}d}t|t��rNt|�}g}d}�}|jD]]}	t	||�}	|	�t	||d��d}�"�|	��\}	}
|xr|
}|r|j
|�d|	����M|j
|	��_�
rb|jrV|jD]G}	t	||�}	|	�t	||d��� �|	��\}	}
|xr|
}|j
|�d|	����I|r<t|�d	kr.|jj�d
dj|��d�|fS|jj�d
|�|j|��d�dfSt|t�r&|sy
d|�|j��fd�|D���d�dfSt|�dfS#t
$rd}Y���wxYw#t
$rY��wxYw)N��
z,
��, T.�=r
�(�)F)z[]T�[c3�6�K�|]}�|��d���y�w�rN�)�.0�x�_format�levels  ��r�	<genexpr>z(dump.<locals>._format.<locals>.<genexpr>�s�����/S�d����5�0A�!�0D�d�s��])r�ASTr,�_fieldsr$�AttributeError�append�_attributesrH�	__class__�__name__�joinr?�repr)r%rj�prefix�sep�clsrE�	allsimplerF�namer-�simpleri�annotate_fields�include_attributesrYs `         ����rrizdump.<locals>._formats
������Q�J�E��F�U�N�*�F��&�5�.�(�C��F��C��d�C� ��t�*�C��D��I�&�H������#�D�$�/�E��=�W�S�$��%<�%D�#�H�� '��u� 5�
��v�%�0�&�	���K�K�4�� 7�8��K�K��&�%�"�d�&6�&6� �,�,�D�!� '��d� 3���}���d�C�)@�)H� �$+�E�5�$9�M�E�6� )� 4�f�I��K�K�4�� 7�8�-��S��Y�!�^�#'�>�>�#:�#:�D�I�I�d�O�L�RV�h�V�V�!%���!8�!8�&�#�(�(�4�.�Q�SX�X�X�
��d�
#��!��%�s�x�x�/S�d�/S�'S�T�V[�[�[��D�z�4����=&��#�H���� *�!� �!�s$�G�G�G�G�	G �G zexpected AST, got %r� )r)rrm�	TypeErrorrrrsrS)r%r|r}rYris ```@r�dumpr�ssa���
�. �. �`�d�C� ��.����1H�1H�H�I�I�
��*�V�S�"9��v����4�=���rc���	dD][}||jvs�||jvs�!t||d�}|�t||�s�=|jd�s�Ot	|||��]|S)N)r"�
col_offset�
end_lineno�end_col_offset�end_)rqr$�hasattr�
startswith�setattr)�new_node�old_node�attrr-s    r�
copy_locationr��sn���G���8�'�'�'�D�H�4H�4H�,H��H�d�D�1�E�� ���$�'�D�O�O�F�,C���$��.�G��Orc�,��	�fd���|dddd�|S)Nc���d|jvr t|d�s||_n|j}d|jvr!t|dd��||_n|j}d|jvr t|d�s||_n|j
}d|jvr!t|dd��||_n|j}t|�D]}�|||||��y)Nr"r�r�r�)rqr�r"r$r�r�r��iter_child_nodes)r%r"r�r�r��child�_fixs      �rr�z#fix_missing_locations.<locals>._fix�s�����t�'�'�'��4��*�$��������4�+�+�+��t�\�4�0�8�",���!�_�_�
��4�+�+�+��4��.�",���!�_�_�
��t�/�/�/��t�-�t�4�<�&4��#�!%�!4�!4��%�d�+�E����
�J��G�,rr\rrf)r%r�s @r�fix_missing_locationsr��s%����H�.	��q�!�Q����Krr\c��	t|�D]t}t|t�rt|dd�|z|_�)d|j
vrt|dd�|z|_d|j
vs�[t|dd�x}��k||z|_�v|S)Nr"rr�)�walkr�
TypeIgnorer$r"rqr�)r%�nr�r�s    r�increment_linenor��s����
�d����e�Z�(�"�5�(�A�6��:�E�L���u�(�(�(�"�5�(�A�6��:�E�L��E�-�-�-�&�u�l�A�>�>��K�)�A�~�E����Krc#�pK�	|jD]}	|t||�f���y#t$rY�"wxYw�wr*)rnr$ro)r%�fields  r�iter_fieldsr�sE���������	����u�-�-�-����	��	�s�6�'�6�	3�6�3�6c#�K�	t|�D]G\}}t|t�r|���t|t�s�,|D]}t|t�s�|����Iy�wr*)r�rrmr?)r%rzr��items    rr�r�
sR�����#�4�(���e��e�S�!��K�
��t�
$����d�C�(��J��	)�s�8A�A�	Ac��	t|ttttf�s"td|jjz��|jrt|jdt�sy|jdj}t|t�r't|jt�r
|j}ny|rddl
}|j|�}|S)Nz%r can't have docstringsr)r�AsyncFunctionDef�FunctionDef�ClassDef�ModulerrrrsrV�Exprr-r+rS�inspect�cleandoc)r%�clean�textr�s    r�
get_docstringr�s�����d�-�{�H�f�M�N��2�T�^�^�5L�5L�L�M�M��9�9��D�I�I�a�L�$�7���9�9�Q�<���D��$��!�j����S�&A��z�z���������%���Krz(.*?(?:\r\n|\n|\r|$))c��	g}ttj|�d�D]#\}}|�||kDr|S|j|d��%|S�Nr\r)�	enumerate�
_line_pattern�finditerrp)r�maxlines�linesr"�matchs     r�_splitlines_no_ffr�4s]���
�E�"�=�#9�#9�&�#A�1�E�
�����F�X�$5���L�	���U�1�X��F��Lrc�8�	d}|D]}|dvr||z
}�
|dz
}�|S)Nr^z	r~rf)r�result�cs   r�_pad_whitespacer�As4��A�
�F�
����;��a�K�F��c�M�F�	�
�Mr)�paddedc��		|j�|j�y|jdz
}|jdz
}|j}|j}t||dz��}||k(r$||j
�||j�S|r.t||j
�d|j��}nd}|||j
�|dj�z}	||j
�d|j�}
||dz|}|jd|	�|j|
�dj|�S#t$rYywxYw)Nr\)r�r^r)r�r�r"r�ror��encode�decoder��insertrprt)rr%r�r"r�r�r�r��padding�first�lasts           r�get_source_segmentr�LsU�����?�?�"�d�&9�&9�&A�����q����_�_�q�(�
��_�_�
��,�,��
�f�z�!�|�<�E��V���V�}�#�#�%�j��@�G�G�I�I�
�!�%��-�"6�"6�"8��*�"E�"L�"L�"N�O�����e�F�m�*�*�,�Z�[�9�@�@�B�B�E����#�#�%�o�~�6�=�=�?�D��&��(�:�&�E�	�L�L��E��	�L�L���
�7�7�5�>���%����s�E�6E�	E�Ec#�K�	ddlm}||g�}|r2|j�}|jt	|��|��|r�1yy�w)Nr)�deque)�collectionsr��popleft�extendr�)r%r��todos   rr�r�qsE�����
"��$��=�D�
��|�|�~�����$�T�*�+��
��s�AA�Ac� �eZdZ	d�Zd�Zd�Zy)�NodeVisitorc�t�	d|jjz}t|||j�}||�S)N�visit_)rrrsr$�
generic_visit)�selfr%�method�visitors    r�visitzNodeVisitor.visit�s7����D�N�N�3�3�3���$���(:�(:�;���t�}�rc���	t|�D]a\}}t|t�r*|D]$}t|t�s�|j	|��&�@t|t�s�Q|j	|��cyr*)r�rr?rmr�)r�r%r�r-r�s     rr�zNodeVisitor.generic_visit�sZ��G�'��-�L�E�5��%��&�!�D�!�$��,��
�
�4�(�"��E�3�'��
�
�5�!�
.rc�f�|j}tjt|��}|�,tj	�D]\}}t||�s�|}n|�8d|z}	t
||�}ddl}|j|�d�td�||�S|j|�S#t$rY�wxYw)Nr�rz" is deprecated; add visit_Constant�)r-�_const_node_type_names�getr,�itemsrr$�warnings�warn�DeprecationWarningror�)	r�r%r-�	type_namerxrzr�r�r�s	         r�visit_ConstantzNodeVisitor.visit_Constant�s����
�
��*�.�.�t�E�{�;�	���3�9�9�;�	��T��e�S�)� $�I��<�� ��	�)�F�
%�!�$��/�� ��
�
���(J�K�0�!�5��t�}�$��!�!�$�'�'��"�
��
�s�!B$�$	B0�/B0N)rs�
__module__�__qualname__r�r�r�rfrrr�r�s���&�"�(rr�c��eZdZ	d�Zy)�NodeTransformerc��t|�D]�\}}t|t�rfg}|D]Y}t|t�r6|j	|�}|��'t|t�s|j|��I|j
|��[||dd�|t|t�s��|j	|�}|�
t||���t|||���|Sr*)	r�rr?rmr�r�rp�delattrr�)r�r%r��	old_value�
new_valuesr-r�s       rr�zNodeTransformer.generic_visit�s��� +�D� 1��E�9��)�T�*��
�&�E�!�%��-� $�
�
�5� 1�� �=�$�!+�E�3�!7�&�-�-�e�4�$��%�%�e�,�'� *�	�!���I�s�+��:�:�i�0���#��D�%�(��D�%��2�%!2�&�rN)rsr�r�r�rfrrr�r��s
��!�Frr�zN{name} is deprecated and will be removed in Python {remove}; use value insteadzU{name} is deprecated and will be removed in Python {remove}; use ast.Constant insteadr�c�T�	ddl}|jdtd��|jS�NrzAttribute n�r
���message�remove�r��_deprecated�_DEPRECATED_VALUE_ALIAS_MESSAGEr-�r�r�s  r�	_n_getterr��/��,������#B�7�	�	
��z�z�rc�J�ddl}|jdtd��||_yr�r��r�r-r�s   r�	_n_setterr�
�)�������#B�7�	�	
���
rc�T�	ddl}|jdtd��|jS�NrzAttribute sr�r�r�r�s  r�	_s_getterr�r�rc�J�ddl}|jdtd��||_yr�r�r�s   r�	_s_setterr�r�rc��eZdZd�Zd�Zy)�_ABCc��d|_y)Nz3Deprecated AST node class. Use ast.Constant instead)�__doc__)rxrEs  r�__init__z
_ABC.__init__%s	��O��rc�f�|tvr)ddl}|jd|j��td��t|t�sy|tvrC	|j}t|t|�xr!t|tj|d��Stj||�S#t$rYywxYw)Nr�ast.r�r�Frf)
�_const_typesr�r�r��_DEPRECATED_CLASS_MESSAGErr+r-�_const_types_notr�ror,�__instancecheck__)rx�instr�r-s    rrz_ABC.__instancecheck__(s����,���� � ��s�'�'�(�)�1��
!�
�
�$��)���,��
��
�
��
�u�l�3�&7�8�I�"�5�*:�*>�*>�s�B�*G�H�H���%�%�c�4�0�0��"�
��
�s�B$�$	B0�/B0N)rsr�r�r�rrfrrr�r�#s
��P�1rr�c�^�|D]T}||jvr�|jj|�}|t|�ks�<t|j�d|����|t
vr4ddl}|jd|j��td��t|i|��Stj|g|��i|��S)Nz" got multiple values for argument rr�r�r�)rn�indexrHrrsr�r�r�r�r�r+�__new__)rxrE�kwargs�key�posr�s      r�_newr>s������c�k�k�!���k�k����$����T��?��s�|�|�n�,N�s�g�V�W�W�
��l�������3�#�#�$�%�/H�QX�	�	
���(��(�(����C�1�$�1�&�1�1rc��eZdZdZeZy)�Num)r�N�rsr�r�rnrrrfrrr
r
N����G��Grr
)�	metaclassc��eZdZdZeZy)�Str��sNrrfrrrrRrrrc��eZdZdZeZy)�BytesrNrrfrrrrVrrrc��eZdZeZy)�NameConstantN)rsr�r�rrrfrrrrZs���Grrc��eZdZdZd�Zy)�Ellipsisrfc��|tur+ddl}|jdtd��t	dg|��i|��St	j
|g|��i|��S)Nrzast.Ellipsisr�r�.)�
_ast_Ellipsisr�r�r�r+r)rxrErr�s    rrzEllipsis.__new__`sZ���-���� � ��(A�'�
!�
��C�1�$�1�&�1�1�����5�d�5�f�5�5rN)rsr�r�rnrrfrrrr]s���G�6rr.c��eZdZy)�sliceN�rsr�r�rfrrrr�s��$rrc��eZdZ	d�Zy)�Indexc��|Sr*rf)rxr-rs   rrz
Index.__new__�s���rN�rsr�r�rrfrrrr�s
��J�rrc��eZdZ	dd�Zy)�ExtSlicec�>�tt|�t�fi|��Sr*)r;r?�Load)rx�dimsrs   rrzExtSlice.__new__�s���T�$�Z���2�6�2�2rN)rfr rfrrr"r"�s
��;�3rr"r%c��	|jSr*�r=�r�s r�_dims_getterr)�s��+��y�y�rc��||_yr*r'�r�r-s  r�_dims_setterr,�s	����	rc��eZdZy)�SuiteNrrfrrr.r.����9rr.c��eZdZy)�AugLoadNrrfrrr1r1�r/rr1c��eZdZy)�AugStoreNrrfrrr3r3�r/rr3c��eZdZy)�ParamNrrfrrr5r5�r/rr5�1ec��eZdZ	e�Ze�Ze�Ze�Ze�Ze�Z	e�Z
e�Ze�ZeZ
e�Ze�Ze�Ze�Ze�Ze�Ze�Ze�Ze�Zd�Zy)�_Precedencec�N�	|j|dz�S#t$r|cYSwxYw�Nr\)rrrr(s r�nextz_Precedence.next�s.��	��>�>�$��(�+�+���	��K�	�s��$�$N)rsr�r�r�
NAMED_EXPR�TUPLE�YIELD�TEST�OR�AND�NOT�CMP�EXPR�BOR�BXOR�BAND�SHIFT�ARITH�TERM�FACTOR�POWER�AWAIT�ATOMr;rfrrr8r8�s���?���J��F�E��F�E��6�D�	
��B�
�&�C�
�&�C�
�&�C��6�D�
�C��6�D��6�D��F�E��F�E��6�D�
�V�F��F�E��F�E��6�D�rr8)�'�")z"""�'''c����eZdZ	dd�d�Zd�Zd�Zd�Zd�d�Zd�Ze	d�d
��Z
e	d	d�d��Ze	d
��Zd�Z
d�Zd�Zd�Zd�Zd�Z�fd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Z d"�Z!d#�Z"d$�Z#d%�Z$d&�Z%d'�Z&d(�Z'd)�Z(d*�Z)d+�Z*d,�Z+d-�Z,d.�Z-d/�Z.d0�Z/d1�Z0d2�Z1d3�Z2d4�Z3d5�Z4d6�Z5d7�Z6d8�Z7d9�Z8d:�Z9d;�Z:d<�Z;d=�Z<d>�Z=d?�Z>e?dd@�dA�Z@e?dB�dC�ZAdD�ZBd�dE�ZCdF�ZDdG�ZEdH�ZFdI�ZGdJ�ZHdK�ZIdL�ZJdM�ZKdN�ZLdO�ZMdP�ZNdQ�ZOdR�ZPdS�ZQdT�ZRdUdVdWdXdY�ZSeTj�eTj�eTj�eTj�dZ�ZWd[�ZXdWdXd\d]d^d_d`dadbdcdddedfdg�
ZYeTj�eTj�eTj�eTj�eTj�eTj�eTj�eTj�eTj�eTj�eTj�eTj�eTj�dh�
Zaebdi�Zcdj�Zddkdldmdndodpdqdrdsdtdu�
Zedv�Zfdwdxdy�ZgeTj�eTj�dz�Zjd{�Zkd|�Zld}�Zmd~�Znd�Zod��Zpd��Zqd��Zrd��Zsd��Ztd��Zud��Zvd��Zwd��Zxd��Zyd��Zzd��Z{d��Z|d��Z}d��Z~d��Zd��Z�d��Z��xZ�S)��	_UnparserF)�_avoid_backslashesc�X�g|_i|_i|_d|_||_d|_y)NrF)�_source�_precedences�
_type_ignores�_indentrT�_in_try_star)r�rTs  rr�z_Unparser.__init__�s0��������������"4���!��rc��	t|�}	|t|��|D]}|�||��y#t$rYywxYwr*)�iterr;�
StopIteration)r��inter�f�seqrhs     r�
interleavez_Unparser.interleave�sJ��E��3�i��	�
�d�3�i�L������!�����	��	�s�6�	A�Ac���	t|�dk(r||d��jd�y�j�fd�||�y)Nr\r�,c�&���jd�S�Nr_��writer(s�r�<lambda>z&_Unparser.items_view.<locals>.<lambda>�����D�J�J�t�$4r)rHrgra)r��	traverserr�s`  r�
items_viewz_Unparser.items_view�s=���	��u�:��?��e�A�h���J�J�s�O��O�O�4�i��Grc�B�	|jr|jd�yy)Nr])rVrgr(s r�
maybe_newlinez_Unparser.maybe_newline�s��F��<�<��J�J�t��rc�h�	|j�|jd|jz|z�y)Nz    )rmrgrY�r�r�s  r�fillz_Unparser.fill�s-��	������
�
�6�D�L�L�(�4�/�0rc�<�	|jj|�yr*)rVr�ros  rrgz_Unparser.writes��"������D�!rNc#�PK�|�g}|j}||_|��||_y�wr*)rV)r��buffer�original_sources   r�bufferedz_Unparser.buffereds,�����>��F��,�,�������&���s�$&��extrac#�K�	|jd�|r|j|�|xjdz
c_d��|xjdzc_y�w)N�:r\)rgrY)r�rws  r�blockz_Unparser.blocksF����	�
	
�
�
�3����J�J�u��������
�������s�AAc#�ZK�	|j|�d��|j|�y�wr*rf)r��start�ends   r�delimitz_Unparser.delimits(����	G�	
�
�
�5��
��
�
�3��s�)+c�>�|r|j||�St�Sr*)r~r)r�r|r}�	conditions    r�
delimit_ifz_Unparser.delimit_if's����<�<��s�+�+��=� rc�N�	|jdd|j|�|kD�S�Nrarb)r��get_precedence)r��
precedencer%s   r�require_parensz_Unparser.require_parens-s(��:����s�C��)<�)<�T�)B�Z�)O�P�Prc�V�|jj|tj�Sr*)rWr�r8r?�r�r%s  rr�z_Unparser.get_precedence1s!��� � �$�$�T�;�+;�+;�<�<rc�0�|D]}||j|<�yr*)rW)r�r��nodesr%s    r�set_precedencez_Unparser.set_precedence4s���D�&0�D���d�#�rc�*�	t|ttttf�rt|j�dkry|jd}t|t�sy|j}t|t�rt|jt�r|Syyr�)rr�r�r�r�rHrVr�r-r+rSr�s  r�get_raw_docstringz_Unparser.get_raw_docstring8s{��	8���#�[�(�F�C�
�
����^�a�
���y�y��|���$��%���z�z���d�H�%�*�T�Z�Z��*E��K�+F�%rc�x�|jj|j�xs|j}|�d|��Sy)Nz	 # type: )rXr�r"�type_comment)r�r%�comments   r�get_type_commentz_Unparser.get_type_commentHs?���$�$�(�(����5�J��9J�9J�����w�i�(�(�rc�v��t|t�r|D]}|j|��yt�|�|�yr*)rr?�traverse�superr�)r�r%r�rrs   �rr�z_Unparser.traverseMs1����d�D�!����
�
�d�#��
�G�M�$�rc�j�	g|_|j|�dj|j�S)Nr^)rVr�rtr�s  rr�z_Unparser.visitWs.��	G�����
�
�d���w�w�t�|�|�$�$rc��|j|�x}r0|j|�|j|jdd�y|j|j�yr:)r��_write_docstringr�rV)r�r%�	docstrings   r�"_write_docstring_and_traverse_bodyz,_Unparser._write_docstring_and_traverse_body^sL���/�/��5�5�I�5��!�!�)�,��M�M�$�)�)�A�B�-�(��M�M�$�)�)�$rc���|jD�cic]}|jd|j����c}|_|j	|�|jj�ycc}w)N�ignore)�type_ignoresr"�tagrXr��clear)r�r%r�s   r�visit_Modulez_Unparser.visit_Moduleese���+�+�
�+��
�M�M�V�F�J�J�<�0�0�+�
���	
�/�/��5���� � �"��
s�!A$c����jdd�5�j�fd��j|j�ddd��j	d��j|j
�y#1swY�6xYw)Nrarbc�&���jd�Srerfr(s�rrhz._Unparser.visit_FunctionType.<locals>.<lambda>p�����
�
�4�(r� -> )r~rar��argtypesrg�returnsr�s` r�visit_FunctionTypez_Unparser.visit_FunctionTypemsX���
�\�\�#�s�
#��O�O�(�$�-�-����
�$�
	
�
�
�6���
�
�d�l�l�#�
$�
#�s�+A4�4A=c��|j�|jtj|j�|j|j�yr*)rpr�r8r>r-r�r�s  r�
visit_Exprz_Unparser.visit_Exprvs5���	�	�����K�-�-�t�z�z�:��
�
�d�j�j�!rc�f�|jtj|�5|jtj|j
|j�|j|j
�|jd�|j|j�ddd�y#1swYyxYw)Nz := )	r�r8r<r�rN�targetr-r�rgr�s  r�visit_NamedExprz_Unparser.visit_NamedExpr{sp��
�
 �
 ��!7�!7��
>����� 0� 0�$�+�+�t�z�z�J��M�M�$�+�+�&��J�J�v���M�M�$�*�*�%�	?�
>�
>�s�A=B'�'B0c�|���jd��j�fd��j|j�y)Nzimport c�&���jd�Srerfr(s�rrhz(_Unparser.visit_Import.<locals>.<lambda>������
�
�4� 0r)rprar��namesr�s` r�visit_Importz_Unparser.visit_Import�s(����	�	�)�����0�$�-�-����Lrc�0���jd��jd|jxsdz�|jr�j|j��jd��j	�fd��j
|j�y)Nzfrom �.rz import c�&���jd�Srerfr(s�rrhz,_Unparser.visit_ImportFrom.<locals>.<lambda>�r�r)rprgrj�modulerar�r�r�s` r�visit_ImportFromz_Unparser.visit_ImportFrom�sd����	�	�'���
�
�3�$�*�*�/��*�+��;�;��J�J�t�{�{�#��
�
�:�����0�$�-�-����Lrc�J�|j�|jD]D}|jtj|�|j|�|j
d��F|j|j�|j|�x}r|j
|�yy)N� = )	rp�targetsr�r8r=r�rgr-r�)r�r%r�r�s    r�visit_Assignz_Unparser.visit_Assign�s����	�	���l�l�F����� 1� 1�6�:��M�M�&�!��J�J�u��#�	
�
�
�d�j�j�!��0�0��6�6�<�6��J�J�|�$�7rc��|j�|j|j�|jd|j|j
jjzdz�|j|j�y)Nr~z= )	rpr�r�rg�binopr4rrrsr-r�s  r�visit_AugAssignz_Unparser.visit_AugAssign�sZ���	�	���
�
�d�k�k�"��
�
�3����D�G�G�$5�$5�$>�$>�?�?�$�F�G��
�
�d�j�j�!rc���|j�|jdd|jxrt|jt
��5|j
|j�ddd�|jd�|j
|j�|jr-|jd�|j
|j�yy#1swY�oxYw)Nrarbr#r�)
rpr�r{rr�rCr�rg�
annotationr-r�s  r�visit_AnnAssignz_Unparser.visit_AnnAssign�s����	�	��
�_�_�S�#�4�;�;��'X�:�d�k�k�SW�;X�
Y��M�M�$�+�+�&�Z��
�
�4���
�
�d�o�o�&��:�:��J�J�u���M�M�$�*�*�%��	Z�
Y�s�C�Cc��|jd�|jr-|jd�|j|j�yy)N�returnr~)rpr-rgr�r�s  r�visit_Returnz_Unparser.visit_Return�s5���	�	�(���:�:��J�J�s�O��M�M�$�*�*�%�rc�&�|jd�y)N�pass�rpr�s  r�
visit_Passz_Unparser.visit_Pass�s���	�	�&�rc�&�|jd�y)N�breakr�r�s  r�visit_Breakz_Unparser.visit_Break�s���	�	�'�rc�&�|jd�y)N�continuer�r�s  r�visit_Continuez_Unparser.visit_Continue�s���	�	�*�rc�|���jd��j�fd��j|j�y)Nzdel c�&���jd�Srerfr(s�rrhz(_Unparser.visit_Delete.<locals>.<lambda>�r�r)rprar�r�r�s` r�visit_Deletez_Unparser.visit_Delete�s(����	�	�&�����0�$�-�-����Nrc���|jd�|j|j�|jr-|j	d�|j|j�yy)Nzassert r_)rpr��testr&rgr�s  r�visit_Assertz_Unparser.visit_Assert�sF���	�	�)���
�
�d�i�i� ��8�8��J�J�t���M�M�$�(�(�#�rc�|���jd��j�fd��j|j�y)Nzglobal c�&���jd�Srerfr(s�rrhz(_Unparser.visit_Global.<locals>.<lambda>�r�r�rprargr�r�s` r�visit_Globalz_Unparser.visit_Global�s(����	�	�)�����0�$�*�*�d�j�j�Irc�|���jd��j�fd��j|j�y)Nz	nonlocal c�&���jd�Srerfr(s�rrhz*_Unparser.visit_Nonlocal.<locals>.<lambda>�r�rr�r�s` r�visit_Nonlocalz_Unparser.visit_Nonlocal�s(����	�	�+�����0�$�*�*�d�j�j�Irc�T�|jtj|�5|jd�|jrV|jd�|jtj|j�|j|j�ddd�y#1swYyxYw)N�awaitr~)r�r8rMrgr-r�rNr�r�s  r�visit_Awaitz_Unparser.visit_Await��l��
�
 �
 ��!2�!2�D�
9��J�J�w���z�z��
�
�3���#�#�K�$4�$4�d�j�j�A��
�
�d�j�j�)�:�
9�
9���A4B�B'c�T�|jtj|�5|jd�|jrV|jd�|jtj|j�|j|j�ddd�y#1swYyxYw)N�yieldr~)r�r8r>rgr-r�rNr�r�s  r�visit_Yieldz_Unparser.visit_Yield�r�r�c�H�|jtj|�5|jd�|jstd��|j
tj|j�|j|j�ddd�y#1swYyxYw)Nzyield from z-Node can't be used without a value attribute.)	r�r8r>rgr-rr�rNr�r�s  r�visit_YieldFromz_Unparser.visit_YieldFrom�sm��
�
 �
 ��!2�!2�D�
9��J�J�}�%��:�:� �!P�Q�Q����� 0� 0�$�*�*�=��M�M�$�*�*�%�:�
9�
9�s�A.B�B!c�8�|jd�|js|jrtd��y|j	d�|j|j�|jr-|j	d�|j|j�yy)N�raisez*Node can't use cause without an exception.r~z from )rp�exc�causerrgr�r�s  r�visit_Raisez_Unparser.visit_Raise�sn���	�	�'���x�x��z�z� �#M�O�O���
�
�3���
�
�d�h�h���:�:��J�J�x� ��M�M�$�*�*�%�rc�`�|jd�|j�5|j|j�ddd�|jD]}|j|��|j
rE|jd�|j�5|j|j
�ddd�|jrF|jd�|j�5|j|j�ddd�yy#1swY��xYw#1swY�hxYw#1swYyxYw)N�try�else�finally)rprzr�rV�handlers�orelse�	finalbody)r�r%�exs   r�do_visit_tryz_Unparser.do_visit_try�s����	�	�%��
�Z�Z�\��M�M�$�)�)�$���-�-�B��M�M�"�� ��;�;��I�I�f�������
�
�d�k�k�*���>�>��I�I�i� ������
�
�d�n�n�-�����\�������s#�D�D�&D$�D�D!�$D-c�t�|j}	d|_|j|�||_y#||_wxYw)NF�rZr��r�r%�prev_in_try_stars   r�	visit_Tryz_Unparser.visit_Try�s;���,�,��	1� %�D�����d�#� 0�D��� 0�D����.�	7c�t�|j}	d|_|j|�||_y#||_wxYw)NTr�r�s   r�
visit_TryStarz_Unparser.visit_TryStars;���,�,��	1� $�D�����d�#� 0�D��� 0�D��r�c��|j|jrdnd�|jr,|jd�|j	|j�|j
r,|jd�|j|j
�|j
�5|j	|j�ddd�y#1swYyxYw)Nzexcept*�exceptr~� as )rprZr,rgr�rzrzrVr�s  r�visit_ExceptHandlerz_Unparser.visit_ExceptHandler
s����	�	�t�0�0�)�h�?��9�9��J�J�s�O��M�M�$�)�)�$��9�9��J�J�v���J�J�t�y�y�!�
�Z�Z�\��M�M�$�)�)�$��\�\�s� C�Cc���|j�|jD]$}|jd�|j|��&|jd|jz�t|d�r|j
|j�|jdd|jxs|j��5d}|jD])}|r|jd�nd	}|j|��+|jD])}|r|jd�nd	}|j|��+	ddd�|j�5|j|�ddd�y#1swY�4xYw#1swYyxYw)
N�@zclass �type_paramsrarb)r�Fr_T)rm�decorator_listrpr�rzr��_type_params_helperrr��basesrFrgrzr�)r�r%�deco�comma�es     r�visit_ClassDefz_Unparser.visit_ClassDefs$�������'�'�D��I�I�c�N��M�M�$��(�	
�	�	�(�T�Y�Y�&�'��4��'��$�$�T�%5�%5�6�
�_�_�S�#�4�:�:�3N����_�
O��E��Z�Z����J�J�t�$� �E��
�
�a� � ��]�]����J�J�t�$� �E��
�
�a� �#�P��Z�Z�\��3�3�D�9��\�P�
O���\�s�5A3E�E(�E%�(E1c�(�|j|d�y)N�def��_function_helperr�s  r�visit_FunctionDefz_Unparser.visit_FunctionDef2s�����d�E�*rc�(�|j|d�y)Nz	async defr
r�s  r�visit_AsyncFunctionDefz _Unparser.visit_AsyncFunctionDef5s�����d�K�0rc��|j�|jD]$}|jd�|j|��&|dz|jz}|j|�t|d�r|j
|j�|jdd�5|j|j�ddd�|jr,|jd�|j|j�|j|j|���5|j|�ddd�y#1swY�}xYw#1swYyxYw)Nr�r~rrarbr�rv)rmrrpr�rzr�rrr~rEr�rgrzr�r�)r�r%�fill_suffixr�def_strs     rrz_Unparser._function_helper8s��������'�'�D��I�I�c�N��M�M�$��(���#�d�i�i�/���	�	�'���4��'��$�$�T�%5�%5�6�
�\�\�#�s�
#��M�M�$�)�)�$�$��<�<��J�J�v���M�M�$�,�,�'�
�Z�Z�d�3�3�D�9�Z�
:��3�3�D�9�;�
:�$�
#��
;�
:�s� D8�E�8E�E
c���|�Kt|�dkDr<�jdd�5�j�fd��j|�ddd�yyy#1swYyxYw)Nrrcrlc�&���jd�Srerfr(s�rrhz/_Unparser._type_params_helper.<locals>.<lambda>L�����
�
�4�(8r)rHr~rar�)r�rs` rrz_Unparser._type_params_helperIsO����"�s�;�'7�!�';����c�3�'���� 8�$�-�-��U�(�'�(<�"�'�'�s�!A�Ac��|j|j�|jr-|jd�|j|j�yy�Nr#)rgrz�boundr�r�s  r�
visit_TypeVarz_Unparser.visit_TypeVarNs:���
�
�4�9�9���:�:��J�J�t���M�M�$�*�*�%�rc�@�|jd|jz�y�Nr�rgrzr�s  r�visit_TypeVarTuplez_Unparser.visit_TypeVarTupleTs���
�
�3����?�#rc�@�|jd|jz�y�N�**rr�s  r�visit_ParamSpecz_Unparser.visit_ParamSpecWs���
�
�4�$�)�)�#�$rc���|jd�|j|j�|j|j�|jd�|j|j�y)Nztype r�)rpr�rzrrrgr-r�s  r�visit_TypeAliasz_Unparser.visit_TypeAliasZsN���	�	�'���
�
�d�i�i� �� � ��!1�!1�2��
�
�5���
�
�d�j�j�!rc�(�|jd|�y)Nzfor ��_for_helperr�s  r�	visit_Forz_Unparser.visit_Foras�������&rc�(�|jd|�y)Nz
async for r$r�s  r�visit_AsyncForz_Unparser.visit_AsyncFords������t�,rc�f�|j|�|jtj|j�|j|j�|j
d�|j|j�|j|j|���5|j|j�ddd�|jrF|jd�|j�5|j|j�ddd�yy#1swY�\xYw#1swYyxYw)N� in rvr�)rpr�r8r=r�r�rgr\rzr�rVr�)r�rpr%s   rr%z_Unparser._for_helpergs����	�	�$�����K�-�-�t�{�{�;��
�
�d�k�k�"��
�
�6���
�
�d�i�i� �
�Z�Z�d�3�3�D�9�Z�
:��M�M�$�)�)�$�;��;�;��I�I�f�������
�
�d�k�k�*����;�
:����s�$D�5D'�D$�'D0c��|jd�|j|j�|j�5|j|j�ddd�|j
r�t
|j
�dk(r�t|j
dt�r�|j
d}|jd�|j|j�|j�5|j|j�ddd�|j
r6t
|j
�dk(rt|j
dt�r��|j
rF|jd�|j�5|j|j
�ddd�yy#1swY��OxYw#1swY��xYw#1swYyxYw)Nzif r\rzelif r�)	rpr�r�rzrVr�rHr�Ifr�s  r�visit_Ifz_Unparser.visit_Ifts+���	�	�%���
�
�d�i�i� �
�Z�Z�\��M�M�$�)�)�$���k�k�c�$�+�+�.�!�3�
�4�;�;�q�>�SU�8V��;�;�q�>�D��I�I�g���M�M�$�)�)�$������
�
�d�i�i�(��	�k�k�c�$�+�+�.�!�3�
�4�;�;�q�>�SU�8V��;�;��I�I�f�������
�
�d�k�k�*�����\�����
��s#�F&�-F3�F?�&F0�3F<�?Gc��|jd�|j|j�|j�5|j|j�ddd�|j
rF|jd�|j�5|j|j
�ddd�yy#1swY�\xYw#1swYyxYw)Nzwhile r�)rpr�r�rzrVr�r�s  r�visit_Whilez_Unparser.visit_While�s����	�	�(���
�
�d�i�i� �
�Z�Z�\��M�M�$�)�)�$���;�;��I�I�f�������
�
�d�k�k�*�����\����s�B4�C�4B=�C	c����jd��j�fd��j|j��j	�j|���5�j|j�ddd�y#1swYyxYw)Nzwith c�&���jd�Srerfr(s�rrhz&_Unparser.visit_With.<locals>.<lambda>�r�rrv�rprar�r�rzr�rVr�s` r�
visit_Withz_Unparser.visit_With�s]����	�	�'�����0�$�-�-����L�
�Z�Z�d�3�3�D�9�Z�
:��M�M�$�)�)�$�;�
:�
:���B�Bc����jd��j�fd��j|j��j	�j|���5�j|j�ddd�y#1swYyxYw)Nzasync with c�&���jd�Srerfr(s�rrhz+_Unparser.visit_AsyncWith.<locals>.<lambda>�r�rrvr2r�s` r�visit_AsyncWithz_Unparser.visit_AsyncWith�s]����	�	�-� ����0�$�-�-����L�
�Z�Z�d�3�3�D�9�Z�
:��M�M�$�)�)�$�;�
:�
:�r4��quote_types�escape_special_whitespacec�����	�fd�}djt|����|}d�vr|D�cgc]
}|tvs�|��}}|D�cgc]	}|�vs�|��}}|s+t���t	�fd�|D��d�}�dd|gfS�r1|j�fd��	�|dd�dk(r�ddd
z�dz��|fScc}wcc}w)Nc����s|dvr|S|dk(s|j�s |jd�jd�S|S)Nz
	�\�unicode_escape�ascii)�isprintabler�r�)r�r:s �r�escape_charz2_Unparser._str_literal_helper.<locals>.escape_char�sB���-��f�����D�y��
�
���x�x� 0�1�8�8��A�A��Hrr^r]c3�2�K�|]}�d|vs�|���y�wrerf)rg�q�strings  �rrkz0_Unparser._str_literal_helper.<locals>.<genexpr>�s�����C�[��F�1�I��N�!�[�s��rr\rc���|d�dk(S)Nrrrf)rC�escaped_strings �rrhz/_Unparser._str_literal_helper.<locals>.<lambda>�s���q��t�~�b�7I�/Ir)rr=)rtr<�
_MULTI_QUOTESrur;�sort)	r�rDr9r:rA�possible_quotesrC�quoterFs	 ` `    @r�_str_literal_helperz_Unparser._str_literal_helper�s����	�	�����[�&�!9�:��%���>�!�*9�P�/�Q�Q�-�=O�q�/�O�P�&5�Q�o���.�9P�1�o��Q���&�\�F��C�[�C�V�A�Y�O�E��!�B�<�%��(�(��� � �%I� �J��q�!�!�$��r�(:�:�!/���!4�t�!;�n�R�>P�!P����.�.��#Q��Qs�
B;�B;�	C�C�r9c�j�	|j||��\}}|d}|j|�|�|���y)NrLr)rKrg)r�rDr9�
quote_types    r�_write_str_avoiding_backslashesz)_Unparser._write_str_avoiding_backslashes�sA��Y�"�6�6�v�;�6�W���� ��^�
��
�
�j�\�&��*��6�7rc�&�|jd�g}|jD]\}|j�5}|j|�ddd�|j	dj�t
|t�f��^g}tt�}d}|D]l\}}|r8|j||d��\}}	t|	�j|�rd}n2|	}nd|vr|D�
cgc]
}
|
tvs�|
��}}
|j	|��n|rNdg}|j�|D]6\}}|rtd|z�}d	}|t!|�d
}|j	|��8dj|�}|d}|j|�|�|���y#1swY��>xYwcc}
w)Nr_r^FTr8r]rQrPz'"rr)rgrJru�_write_fstring_innerrprtrr+r?�_ALL_QUOTESrKr:�
isdisjointrGr�rurH)
r�r%�
fstring_partsr-rs�new_fstring_partsr9�fallback_to_repr�is_constant�new_quote_typesrC�expected_prefixrNs
             r�visit_JoinedStrz_Unparser.visit_JoinedStr�s����
�
�3���
��[�[�E�����F��)�)�%�0�!�� � ������*�U�H�"=�>�
�!����;�'�� ��"/��E�;��)-�)A�)A�� +�.2�*B�*�&���
��'�2�2�;�?�'+�$��-�����*5�L�+�Q��m�9K�q�+��L��$�$�U�+�#0� �!�'�K��#�#�%�&3�"��{�� ��u��-�E�&+�O�!�#�o�"6�r�:�E�!�(�(��/�
'4����)�*�� ��^�
��
�
�j�\�%����5�6�Q!���*Ms�F�
F�*F�F	c�0�t|t�r%|jD]}|j||���yt|t�r�t|j
t�r�|j
jdd�jdd�}|rH|jdd�}|jdd	�}|jd
d�}|jdd
�}|j|�yt|t�r|j|�ytd|����)N��is_format_spec�{z{{�}z}}r=z\\rOz\'rPz\"r]z\nz"Unexpected node inside JoinedStr, )r�	JoinedStrrJrQr+r-rS�replacerg�FormattedValue�visit_FormattedValuer)r�r%r]r-s    rrQz_Unparser._write_fstring_inner�s����d�I�&������)�)�%��)�O�%�
��h�
'�J�t�z�z�3�,G��J�J�&�&�s�D�1�9�9�#�t�D�E���
�
�d�F�3���
�
�c�5�1���
�
�c�5�1���
�
�d�E�2���J�J�u��
��n�
-��%�%�d�+��A�$��J�K�Krc�����fd�}�jdd�5||j�}|jd�r�jd��j|�|jdk7r'�jdt|j����|jr.�jd��j|jd�	�ddd�y#1swYyxYw)
Nc���t���}|jtjj	�|�|j|�Sr*)r,r�r8r?r;r�)�inner�unparserr�s  �r�
unparse_innerz5_Unparser.visit_FormattedValue.<locals>.unparse_inners>���!�t�D�z�|�H��#�#�K�$4�$4�$9�$9�$;�U�C��>�>�%�(�(rr^r_r~r�!ryTr\)r~r-r�rg�
conversion�chr�format_specrQ)r�r%rh�exprs`   rrcz_Unparser.visit_FormattedValue
s����	)�
�\�\�#�s�
#� ����,�D����s�#��
�
�3���J�J�t�����"�$��
�
�Q�s�4�?�?�3�4�5�6�����
�
�3���)�)�$�*:�*:�4�)�P�$�
#�
#�s�B6C�C!c�:�|j|j�yr*)rgrDr�s  r�
visit_Namez_Unparser.visit_Names���
�
�4�7�7�rc��|j�|jdk(r|jd�|j|jt
��y)N�urL)rp�kindrgrOr-rGr�s  rr�z_Unparser._write_docstrings9���	�	���9�9����J�J�s�O��,�,�T�Z�Z�]�,�Src
�\�t|ttf�rN|jt	|�jdt�jddt�dt�d���y|jr"t|t�r|j|�y|jt	|��y)N�inf�nanra�-rb)
rr/r0rgrura�_INFSTRrTrSrOr+s  r�_write_constantz_Unparser._write_constant%s���e�e�W�-�.�
�J�J��U������(����!�G�9�A�g�Y�a� 8�9�
�
�
$�
$��E�3�)?��0�0��7��J�J�t�E�{�#rc�f�|j}t|t�r8|jdd�5|j	|j
|�ddd�y|dur|j
d�y|jdk(r|j
d�|j|j�y#1swYyxYw)Nrarb.�...rq)r-rrr~rkrxrgrr)r�r%r-s   rr�z_Unparser.visit_Constant3s����
�
���e�U�#����c�3�'����� 4� 4�e�<�(�'�
�c�\��J�J�u���y�y�C���
�
�3��� � ����,�(�'�s�B'�'B0c����jdd�5�j�fd��j|j�ddd�y#1swYyxYw)Nrcrlc�&���jd�Srerfr(s�rrhz&_Unparser.visit_List.<locals>.<lambda>Arir)r~rar�r=r�s` r�
visit_Listz_Unparser.visit_List?s6���
�\�\�#�s�
#��O�O�4�d�m�m�T�Y�Y�O�$�
#�
#���+A�Ac���|jdd�5|j|j�|jD]}|j|��	ddd�y#1swYyxYw)Nrcrl�r~r��elt�
generators�r�r%�gens   r�visit_ListCompz_Unparser.visit_ListCompC�F��
�\�\�#�s�
#��M�M�$�(�(�#������
�
�c�"�'�$�
#�
#���>A�A$c���|jdd�5|j|j�|jD]}|j|��	ddd�y#1swYyxYwr�r�r�s   r�visit_GeneratorExpz_Unparser.visit_GeneratorExpIr�r�c���|jdd�5|j|j�|jD]}|j|��	ddd�y#1swYyxYw)Nr^r_r�r�s   r�
visit_SetCompz_Unparser.visit_SetCompOr�r�c�&�|jdd�5|j|j�|jd�|j|j�|j
D]}|j|��	ddd�y#1swYyxYw)Nr^r_r#)r~r�rrgr-r�r�s   r�visit_DictCompz_Unparser.visit_DictCompUsb��
�\�\�#�s�
#��M�M�$�(�(�#��J�J�t���M�M�$�*�*�%������
�
�c�"�'�	$�
#�
#�s�A*B�Bc�2�|jr|jd�n|jd�|jtj|j
�|j
|j
�|jd�|jtjj�|jg|j���|j
|j�|jD]$}|jd�|j
|��&y)Nz async for z for r*� if )�is_asyncrgr�r8r=r�r�r?r;r\�ifs)r�r%�	if_clauses   r�visit_comprehensionz_Unparser.visit_comprehension]s����=�=��J�J�}�%��J�J�w�����K�-�-�t�{�{�;��
�
�d�k�k�"��
�
�6������K�,�,�1�1�3�T�Y�Y�J����J��
�
�d�i�i� ����I��J�J�v���M�M�)�$�"rc�.�|jtj|�5|jtjj	�|j
|j�|j|j
�|jd�|j|j�|jd�|jtj|j�|j|j�ddd�y#1swYyxYw)Nr�z else )
r�r8r?r�r;rVr�r�rgr�r�s  r�visit_IfExpz_Unparser.visit_IfExpks���
�
 �
 ��!1�!1�4�
8����� 0� 0� 5� 5� 7����D�I�I�N��M�M�$�)�)�$��J�J�v���M�M�$�)�)�$��J�J�x� ����� 0� 0�$�+�+�>��M�M�$�+�+�&�9�
8�
8�s�C!D�Dc����|jrF�jdd�5�j�fd��j|j�ddd�y�j	d�y#1swYyxYw)Nr^r_c�&���jd�Srerfr(s�rrhz%_Unparser.visit_Set.<locals>.<lambda>xrrz{*()})r=r~rar�rgr�s` r�	visit_Setz_Unparser.visit_SetusP����9�9����c�3�'���� 8�$�-�-����S�(�'�

�J�J�w��(�'�s�+A&�&A/c	������fd����fd�}�jdd�5�j�fd�|t|j|j��ddd�y#1swYyxYw)Nc�l���j|��jd��j|�yr�r�rg)�k�vr�s  �r�write_key_value_pairz2_Unparser.visit_Dict.<locals>.write_key_value_pairs'����M�M�!���J�J�t���M�M�!�rc���|\}}|�C�jd��jtj|��j	|�y�||�yr)rgr�r8rDr�)r�r�r�r�r�s   ��r�
write_itemz(_Unparser.visit_Dict.<locals>.write_item�sK����D�A�q��y��
�
�4� ��#�#�K�$4�$4�a�8��
�
�a� �$�Q��*rr^r_c�&���jd�Srerfr(s�rrhz&_Unparser.visit_Dict.<locals>.<lambda>�r�r)r~rarLrIrJ)r�r%r�r�s`  @r�
visit_Dictz_Unparser.visit_Dict~sK���	�
		+��\�\�#�s�
#��O�O�(�*�c�$�)�)�T�[�[�6Q�
�$�
#�
#�s�5A�A'c��|jddt|j�dk(xs"|j|�tj
kD�5|j
|j|j�ddd�y#1swYyxYw)Nrarbr)r�rHr=r�r8r=rkr�r�s  r�visit_Tuplez_Unparser.visit_Tuple�sg��
�_�_�����	�	�N�a��P�4�#6�#6�t�#<�{�?P�?P�#P�
�

�O�O�D�M�M�4�9�9�5�
�
�
�s�'A>�>B�~�not�+rv)�Invert�Notr5r6)r�r�r�rvc��|j|jjj}|j|}|j||�5|j
|�|tjur|j
d�|j||j�|j|j�ddd�y#1swYyxYw�Nr~)�unopr4rrrs�unop_precedencer�rgr8rKr�r7r�)r�r%�operator�operator_precedences    r�
visit_UnaryOpz_Unparser.visit_UnaryOp�s����9�9�T�W�W�.�.�7�7�8��"�2�2�8�<��
�
 �
 �!4�d�
;��J�J�x� �#�+�*<�*<�<��
�
�3����� 3�T�\�\�B��M�M�$�,�,�'�<�
;�
;�s
�A,C�C
rr��/�%�<<�>>�|�^�&�//r)
rNrO�Mult�MatMult�Div�Mod�LShift�RShift�BitOr�BitXor�BitAnd�FloorDiv�Pow)
r�rvrr�r�r�r�r�r�r�r�r�r)rc�6�|j|jjj}|j|}|j||�5||jvr|j�}|}n|}|j�}|j||j�|j|j�|jd|�d��|j||j�|j|j�ddd�y#1swYyxYwr�)
r�r4rrrs�binop_precedencer��binop_rassocr;r�rPr�rgrQ)r�r%r�r��left_precedence�right_precedences      r�visit_BinOpz_Unparser.visit_BinOp�s����:�:�d�g�g�/�/�8�8�9��"�3�3�H�=��
�
 �
 �!4�d�
;��4�,�,�,�"5�":�":�"<��#6� �"5��#6�#;�#;�#=� ��������;��M�M�$�)�)�$��J�J��8�*�A��'���� 0�$�*�*�=��M�M�$�*�*�%�<�
;�
;�s
�B7D�Dz==z!=�<z<=�>z>=�iszis not�inznot in)
�Eq�NotEq�Lt�LtE�Gt�GtE�Is�IsNot�In�NotInc��|jtj|�5|jtjj	�|j
g|j���|j|j
�t|j|j�D]N\}}|jd|j|jjzdz�|j|��P	ddd�y#1swYyxYwr�)r�r8rCr�r;rP�comparatorsr�rL�opsrg�cmpopsrrrs)r�r%�ors    r�
visit_Comparez_Unparser.visit_Compare�s���
�
 �
 ����$�
7��D������ 4� 4� 6��	�	�U�D�DT�DT�U��M�M�$�)�)�$��D�H�H�d�&6�&6�7���1��
�
�3����Q�[�[�-A�-A�!B�B�S�H�I��
�
�a� �8�8�
7�
7�s�CC<�<D�and�or)�And�Or)r�r�c�*�����j|jjj}�j|���fd�}�j�|�5d|�d���j
��fd�||j�ddd�y#1swYyxYw)Nc�l���j���j�|��j|�yr*)r;r�r�)r%r�r�s ��r�increasing_level_traversez9_Unparser.visit_BoolOp.<locals>.increasing_level_traverse�s/���"5�":�":�"<����� 3�T�:��M�M�$�rr~c�&���j��Sr*rf)rr�s��rrhz(_Unparser.visit_BoolOp.<locals>.<lambda>s
���D�J�J�q�Mr)�boolopsr4rrrs�boolop_precedencer�rarJ)r�r%r�r�r�rs`   @@r�visit_BoolOpz_Unparser.visit_BoolOp�sy����<�<���� 1� 1� :� :�;��"�4�4�X�>��	 ��
 �
 �!4�d�
;��H�:�Q��A��O�O�1�3L�d�k�k�Z�<�
;�
;�s�(B	�	Bc��|jtj|j�|j	|j�t|jt�r5t|jjt�r|jd�|jd�|j|j�y)Nr~r�)
r�r8rNr-r�rr+r.rgr�r�s  r�visit_Attributez_Unparser.visit_Attributesu�����K�,�,�d�j�j�9��
�
�d�j�j�!��d�j�j�(�+�
�4�:�:�;K�;K�S�0Q��J�J�s�O��
�
�3���
�
�4�9�9�rc���|jtj|j�|j	|j�|jdd�5d}|jD])}|r|jd�nd}|j	|��+|jD])}|r|jd�nd}|j	|��+	ddd�y#1swYyxYw)NrarbFr_T)	r�r8rNrBr�r~rErgrF)r�r%rrs    r�
visit_Callz_Unparser.visit_Calls������K�,�,�d�i�i�8��
�
�d�i�i� �
�\�\�#�s�
#��E��Y�Y����J�J�t�$� �E��
�
�a� ���]�]����J�J�t�$� �E��
�
�a� �#�$�
#�
#�s
�A3C�Cc��d�}|jtj|j�|j	|j�|jdd�5||j�r1|j|j|jj�n|j	|j�ddd�y#1swYyxYw)Nc�>�t|t�xr|jSr*)rr;r=)�slice_values r�is_non_empty_tuplez5_Unparser.visit_Subscript.<locals>.is_non_empty_tuple&s���;��.�%��$�$�
rrcrl)	r�r8rNr-r�r~rrkr=)r�r%r�s   r�visit_Subscriptz_Unparser.visit_Subscript%s���	�	
���K�,�,�d�j�j�9��
�
�d�j�j�!�
�\�\�#�s�
#�!�$�*�*�-�����
�
�t�z�z���?��
�
�d�j�j�)�$�
#�
#�s
�AC�Cc��|jd�|jtj|j�|j|j�yr)rgr�r8rDr-r�r�s  r�
visit_Starredz_Unparser.visit_Starred5s7���
�
�3�����K�,�,�d�j�j�9��
�
�d�j�j�!rc�&�|jd�y)Nrzrfr�s  r�visit_Ellipsisz_Unparser.visit_Ellipsis:s���
�
�5�rc�4�|jr|j|j�|jd�|jr|j|j�|jr-|jd�|j|j�yy)Nry)�lowerr�rg�upper�stepr�s  r�visit_Slicez_Unparser.visit_Slice=sb���:�:��M�M�$�*�*�%��
�
�3���:�:��M�M�$�*�*�%��9�9��J�J�s�O��M�M�$�)�)�$�rc���|jd�|j|j�|j�5|jD]}|j|��	ddd�y#1swYyxYw)Nzmatch )rpr��subjectrz�cases)r�r%�cases   r�visit_Matchz_Unparser.visit_MatchGsK���	�	�(���
�
�d�l�l�#�
�Z�Z�\��
�
���
�
�d�#�#��\�\�s�#A*�*A3c��|j|j�|jr-|jd�|j|j�yyr)rg�argr�r�r�s  r�	visit_argz_Unparser.visit_argNs:���
�
�4�8�8���?�?��J�J�t���M�M�$�/�/�*�rc�l�d}|j|jz}dgt|�t|j�z
z|jz}t	t||�d�D]\}}|\}}|rd}n|j
d�|j|�|r"|j
d�|j|�|t|j�k(s�o|j
d���|js|jr�|rd}n|j
d�|j
d�|jrq|j
|jj�|jjr6|j
d�|j|jj�|jrot|j|j�D]L\}}|j
d�|j|�|s�+|j
d�|j|��N|jr�|rd}n|j
d�|j
d	|jjz�|jjr7|j
d�|j|jj�yyy)
NTr\Fr_r`z, /rr#r)�posonlyargsrErH�defaultsr�rLrgr��vararg�
kwonlyargsrr��kw_defaults�kwarg)	r�r%r��all_argsrr�elements�a�ds	         r�visit_argumentsz_Unparser.visit_argumentsTs�����#�#�d�i�i�/���6�S��]�S����-?�?�@�4�=�=�P��(��X�x�)@�!�D�O�E�8��D�A�q�����
�
�4� ��M�M�!����
�
�3���
�
�a� ���D�,�,�-�-��
�
�5�!� E��;�;�$�/�/�����
�
�4� ��J�J�s�O��{�{��
�
�4�;�;�?�?�+��;�;�)�)��J�J�t�$��M�M�$�+�+�"8�"8�9��?�?��D�O�O�T�-=�-=�>���1��
�
�4� ��
�
�a� ���J�J�s�O��M�M�!�$�?��:�:�����
�
�4� ��J�J�t�d�j�j�n�n�,�-��z�z�$�$��
�
�4� ��
�
�d�j�j�3�3�4�%�
rc���|j�|jd�n,|j|j�|jd�|j|j�y)Nrr`)rrgr�r-r�s  r�
visit_keywordz_Unparser.visit_keyword�sC���8�8���J�J�t���J�J�t�x�x� ��J�J�s�O��
�
�d�j�j�!rc���|jtj|�5|jd�|j	�5}|j|j�ddd�r|jdg|���|jd�|jtj|j�|j|j�ddd�y#1swY�}xYw#1swYyxYw)N�lambdar~r#)	r�r8r?rgrur�rEr�rV)r�r%rss   r�visit_Lambdaz_Unparser.visit_Lambda�s���
�
 �
 ��!1�!1�4�
8��J�J�x� �����F��
�
�d�i�i�(�!����
�
�3�(��(��J�J�t������ 0� 0�$�)�)�<��M�M�$�)�)�$�9�
8� ���9�
8�s$�"C'�C�A3C'�C$	� C'�'C0c��|j|j�|jr|jd|jz�yy�Nr�)rgrz�asnamer�s  r�visit_aliasz_Unparser.visit_alias�s3���
�
�4�9�9���;�;��J�J�v����+�,�rc��|j|j�|jr-|jd�|j|j�yyr)r��context_expr�
optional_varsrgr�s  r�visit_withitemz_Unparser.visit_withitem�s@���
�
�d�'�'�(�����J�J�v���M�M�$�,�,�-�rc�L�|jd�|j|j�|jr,|j	d�|j|j�|j�5|j|j�ddd�y#1swYyxYw)Nzcase r�)rpr��pattern�guardrgrzrVr�s  r�visit_match_casez_Unparser.visit_match_case�sd���	�	�'���
�
�d�l�l�#��:�:��J�J�v���M�M�$�*�*�%�
�Z�Z�\��M�M�$�)�)�$��\�\�s�5B�B#c�:�|j|j�yr*)r�r-r�s  r�visit_MatchValuez_Unparser.visit_MatchValue�s���
�
�d�j�j�!rc�:�|j|j�yr*)rxr-r�s  r�visit_MatchSingletonz_Unparser.visit_MatchSingleton�s�����T�Z�Z�(rc����jdd�5�j�fd��j|j�ddd�y#1swYyxYw)Nrcrlc�&���jd�Srerfr(s�rrhz/_Unparser.visit_MatchSequence.<locals>.<lambda>�r�r)r~rar��patternsr�s` r�visit_MatchSequencez_Unparser.visit_MatchSequence�s8���
�\�\�#�s�
#��O�O�(�$�-�-����
�$�
#�
#�r~c�L�|j}|�d}|jd|���y)N�_r)rzrg)r�r%rzs   r�visit_MatchStarz_Unparser.visit_MatchStar�s'���y�y���<��D��
�
�Q�t�f�:�rc
�8���fd�}�jdd�5|j}�j�fd�|t||jd���|j
}|�'|r�j
d��j
d|���ddd�y#1swYyxYw)	Nc�v��|\}}�j|��jd��j|�yrr�)�pairr��pr�s   �r�write_key_pattern_pairz<_Unparser.visit_MatchMapping.<locals>.write_key_pattern_pair�s0����D�A�q��M�M�!���J�J�t���M�M�!�rr^r_c�&���jd�Srerfr(s�rrhz._Unparser.visit_MatchMapping.<locals>.<lambda>�r�rT��strictr_r)r~rIrarLr&�restrg)r�r%r/rIr3s`    r�visit_MatchMappingz_Unparser.visit_MatchMapping�s����	��\�\�#�s�
#��9�9�D��O�O�(�&��D�$�-�-��5�
�
�9�9�D�����J�J�t�$��
�
�R��v�;�'�$�
#�
#�s�A.B�Bc
�����jtj|j��j	|j��jdd�5|j}�j�fd��j|�|j}|rD�fd�}|r�jd��j�fd�|t||jd���ddd�y#1swYyxYw)	Nrarbc�&���jd�Srerfr(s�rrhz,_Unparser.visit_MatchClass.<locals>.<lambda>�r�rc�Z��|\}}�j|�d���j|�y)Nr`)rgr�)r-r�rr�s   �r�write_attr_patternz6_Unparser.visit_MatchClass.<locals>.write_attr_pattern�s*���$(�M�D�'��J�J�$��q�z�*��M�M�'�*rr_c�&���jd�Srerfr(s�rrhz,_Unparser.visit_MatchClass.<locals>.<lambda>�s���D�J�J�t�,rTr1)r�r8rNrxr�r~r&ra�	kwd_attrsrgrL�kwd_patterns)r�r%r&�attrsr8s`    r�visit_MatchClassz_Unparser.visit_MatchClass�s�������K�,�,�d�h�h�7��
�
�d�h�h��
�\�\�#�s�
#��}�}�H��O�O�(�$�-�-��
��N�N�E��+�
��J�J�t�$����,�&���t�0�0��>��$�
#�
#�s
�A?C!�!C*c���|j}|j}|�|jd�y|�|j|j�y|jtj
|�5|j
tj|j�|j|j�|jd|j���ddd�y#1swYyxYw)Nr)r�)	rzrrgr�r8r?r�rEr�)r�r%rzrs    r�
visit_MatchAsz_Unparser.visit_MatchAs�s����y�y���,�,���<��J�J�s�O�
�_��J�J�t�y�y�!��$�$�[�%5�%5�t�<��#�#�K�O�O�T�\�\�B��
�
�d�l�l�+��
�
�T�$�)�)��-�.�=�<�<�s
�+A$C�C!c�6���jtj|�5�jtjj	�g|j
����j
�fd��j|j
�ddd�y#1swYyxYw)Nc�&���jd�S)Nz | rfr(s�rrhz)_Unparser.visit_MatchOr.<locals>.<lambda>�s���D�J�J�u�$5r)r�r8rEr�r;r&rar�r�s` r�
visit_MatchOrz_Unparser.visit_MatchOr�sb���
�
 �
 ����$�
7��D������ 4� 4� 6�G����G��O�O�5�t�}�}�d�m�m�T�8�
7�
7�s�A$B�B)r^r*)F)�rsr�r�r�rarkrmrprgrrurzr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrr r"r&r(r%r-r/r3r7rRrKrOrZrQrcror�rxr�r}r�r�r�r�r�r�r�r�r�r�r8rBrKr�r�r�rIrJrHrErFrGrLr��	frozensetr�r�r�r�r�rAr@r�r�r�r�r�r�r�r�r�rrrrrrrr!r#r'r*r4r=r?rB�
__classcell__)rrs@rrSrS�s�����.3�"�
�H��
1�"��'��'��#��������!�Q�=�1�� )�
 �%�%�#�$�"�
&�M�M�%�"�&�&����O�$�J�J�*�*�&�
&�
.�1�1�	%�:�4+�1�:�"V�
&�$�%�"�'�-�+�+�$+�%�%�&1�E�$/�LFQ�8�-7�^L�&Q�$�T�$�
-�P�#�#�#�#�%�'� ��,6��%��c�B�D����
�
�
�
�
�
�
�
�
�	�O�
(��������������
�E�"�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�������
�_�_�
�
�
�
�
�
��������� �W�%�L�&�$�����������F�!��4�(�G� +���{�~�~�F��[�	�!�$*� "�
�%�$�+�15�f"�	%�-�
.�%�"�)���(�(�./�UrrSc�8�t�}|j|�Sr*)rSr�)�ast_objrgs  r�unparserG�s���{�H��>�>�'�"�"r)r
rrrrc��|tvr7t|xt�|<}ddl}|jd|��td��|Std|�d���)Nrr�r�r�zmodule 'ast' has no attribute 'rO)�_deprecated_globals�globalsr�r�r�ro)rzr-r�s   r�__getattr__rKs`���"�"�"5�d�";�;��	�$��%������4�&�M�#<�W�	�	
���
�:�4�&��B�
C�Crc�v�ddl}|jd��}|jd|jd��ddd	�
�|jddd
dd��|jdddd��|jdddd��|jddtdd��|j�}|j5}|j�}ddd�t|jj|j|j� �}tt||j|j�!��y#1swY�lxYw)"Nrz
python -m ast)�prog�infile�rbr �?rvz$the file to parse; defaults to stdin)r,�nargs�default�helpz-mz--mode�exec)rT�singler�	func_typez(specify what kind of code must be parsed)rR�choicesrSz--no-type-commentsT�store_falsez)don't add information about type comments)rR�actionrSz-az--include-attributes�
store_truez:include attributes such as line numbers and column offsets)rYrSz-iz--indentr
z'indentation of nodes (number of spaces))r,rRrS)r	)r}rY)�argparse�ArgumentParser�add_argument�FileTyper.�
parse_argsrN�readrrzr�no_type_comments�printr�r}rY)r[�parserrErNr�trees      r�mainres6���
�
$�
$�/�
$�
:�F�
����x�'8�'8�d�'8�'C�3� #�C��E�����h�� G�G��I����,�d�=�H��J�
����4�\�.��/�����j�s�A�F��H�����D�	
���������
������)�)�4�9�9�D�DY�DY�Z�D�	�$�t��(?�(?����
T�U�
��s�3D/�/D8�__main__)z	<unknown>rT)TF)r\)Tr*)W�sys�re�_ast�
contextlibrr�enumrrrrrXr�r�r�r�r�r�r�rr�r�r�r�r��objectr�r�r�r�r�r+r�r�r�r��propertyr�rr,r�rr
rrrrrr.r/r0rS�bytes�boolr�r�r�rmrrr"r;r)r,r%�modr.�expr_contextr1r3r5ru�
float_info�
max_10_exprwr8�_SINGLE_QUOTESrGrRrSrGrJ�poprIrKrers)rzs0r�<module>rvs���4�	��2�,�,�5��t�5�,8$�v@��@�F�" �F�.	���0��
�
�3�4�
�
��05�"�J�7(�&�7(�t8�k�8�xU� ����x��������)�Y�/�H�J��)�Y�/�H�J�1�4�1�62� �(�d���(�d���H����8�t��
6�x�4�
6��
��#�u�g�	��#��	�E�8��4��:�t�$��t�C�y�l����$����
	�.���J����	�5��U���	�7���I�z�	��%�C�%��E��
3�u�3��u�f�����,��5�E�J�:�C�:�:�l�:�:�|�:�:�L�:���c�n�n�/�/�!�3�4�
4��
�g������>���
�/��/��/��gU��gU�R!#�D��C��	�'�)�-�-��
��C���
D�V�0�z���F���Qs�H;