Your IP : 3.135.202.168


Current Path : /opt/alt/python311/lib64/python3.11/lib2to3/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/lib2to3/__pycache__/fixer_base.cpython-311.opt-2.pyc

�

c��f"��l�	ddlZddlmZddlmZddlmZGd�de��ZGd�d	e��Z	dS)
�N�)�PatternCompiler)�pygram)�does_tree_importc���eZdZ	dZdZdZdZdZej	d��Z
e��ZdZ
dZdZdZdZdZejZd�Zd�Zd�Zd	�Zd
�Zdd�Zd
�Zdd�Zd�Zd�Zd�Z dS)�BaseFixNr�postF�c�L�	||_||_|���dS�N)�options�log�compile_pattern)�selfr
rs   �9/opt/alt/python311/lib64/python3.11/lib2to3/fixer_base.py�__init__zBaseFix.__init__/s/��	���������������c��	|j�9t��}|�|jd���\|_|_dSdS)NT)�	with_tree)�PATTERNrr�pattern�pattern_tree)r�PCs  rrzBaseFix.compile_pattern;sX��	�
�<�#� �"�"�B�.0�.@�.@���KO�/A�/Q�/Q�+�D�L�$�+�+�+�$�#rc��	||_dSr)�filename)rrs  r�set_filenamezBaseFix.set_filenameFs��	�!��
�
�
rc�F�	d|i}|j�||��o|S)N�node)r�match�rr�resultss   rrz
BaseFix.matchMs/��	��4�.���|�!�!�$��0�0�<�W�<rc� �	t���r)�NotImplementedErrorr s   r�	transformzBaseFix.transformYs��	�"�#�#�#r�xxx_todo_changemec��	|}||jvr-|tt|j����z}||jv�-|j�|��|Sr)�
used_names�str�next�numbers�add)r�template�names   r�new_namezBaseFix.new_nameisa��	����d�o�%�%��c�$�t�|�"4�"4�5�5�5�D��d�o�%�%�����D�!�!�!��rc��|jr)d|_|j�d|jz��|j�|��dS)NFz### In file %s ###)�	first_logr�appendr)r�messages  r�log_messagezBaseFix.log_messagetsJ���>�	B�"�D�N��H�O�O�0�4�=�@�A�A�A������ � � � � rc���	|���}|���}d|_d}|�|||fz��|r|�|��dSdS)N�zLine %d: could not convert: %s)�
get_lineno�clone�prefixr3)rr�reason�lineno�
for_output�msgs      r�cannot_convertzBaseFix.cannot_convertzs|��	����"�"���Z�Z�\�\�
��
��.�������
�3�3�4�4�4��	%����V�$�$�$�$�$�	%�	%rc�d�	|���}|�d||fz��dS)NzLine %d: %s)r6r3)rrr9r:s    r�warningzBaseFix.warning�s<��	����"�"������&�&�)9�9�:�:�:�:�:rc��	|j|_|�|��tjd��|_d|_dS)NrT)r'r�	itertools�countr*r0�r�treers   r�
start_treezBaseFix.start_tree�sB��	��/������(�#�#�#� ��q�)�)�������rc��	dSr�rCs   r�finish_treezBaseFix.finish_tree�s��	�	
�r)r%r)!�__name__�
__module__�__qualname__rrrr
rrArBr*�setr'�order�explicit�	run_order�_accept_type�keep_line_order�
BM_compatibler�python_symbols�symsrrrrr$r.r3r=r?rErHrGrrrrs,��������G��G��L��G��H��i�o�a� � �G�����J��E��H��I��L��O��M�
� �D�
�
�
�	Q�	Q�	Q�!�!�!�
=�
=�
=�$�$�$� 	�	�	�	�!�!�!�
%�
%�
%�
%�;�;�;�
�
�
�
�
�
�
�
rrc�*��eZdZ	dZ�fd�Zd�Z�xZS)�ConditionalFixNc�P��tt|��j|�d|_dSr)�superrVrE�_should_skip)r�args�	__class__s  �rrEzConditionalFix.start_tree�s+���.��n�d�#�#�.��5�5� ����rc���|j�|jS|j�d��}|d}d�|dd���}t	|||��|_|jS)N�.���)rY�skip_on�split�joinr)rr�pkgr-s    r�should_skipzConditionalFix.should_skip�sh����(��$�$��l� � ��%�%���2�w���h�h�s�3�B�3�x� � ��,�S�$��=�=���� � r)rIrJrKr_rErc�
__classcell__)r[s@rrVrV�sQ�������J��G�!�!�!�!�!�!�!�!�!�!�!�!rrV)
rA�patcomprr5r�
fixer_utilr�objectrrVrGrr�<module>rhs���9�����%�$�$�$�$�$�������(�(�(�(�(�(�X
�X
�X
�X
�X
�f�X
�X
�X
�v!�!�!�!�!�W�!�!�!�!�!r

?>