Hacked By AnonymousFox
�
�Q�f" � �^ � d dl Z ddlmZ ddlmZ ddlmZ G d� de� Z G d� d e� Z y)
� N� )�PatternCompiler)�pygram)�does_tree_importc �� � e Zd Z dZdZdZdZdZ ej d� Z
e� ZdZ
dZdZdZdZdZej( Zd� Zd� Zd� Zd � Zd
� Zdd�Zd� Zdd
�Zd� Zd� Zd� Z y)�BaseFixNr �postF� c �B � || _ || _ | j � y �N)�options�log�compile_pattern)�selfr
r s �9/opt/alt/python312/lib64/python3.12/lib2to3/fixer_base.py�__init__zBaseFix.__init__/ s# � � � ���������� c � � | j �5t � }|j | j d�� \ | _ | _ y y )NT)� with_tree)�PATTERNr r �pattern�pattern_tree)r �PCs r r zBaseFix.compile_pattern; sJ � � �
�<�<�#� �"�B�.0�.@�.@����KO� /A� /Q�+�D�L�$�+� $r c � � || _ y r )�filename)r r s r �set_filenamezBaseFix.set_filenameF s � � � !��
r c �L � d|i}| j j ||� xr |S )N�node)r �match�r r �resultss r r z
BaseFix.matchM s. � � � �4�.���|�|�!�!�$��0�<�W�<r c � � t � �r )�NotImplementedErrorr s r � transformzBaseFix.transformY s � � � "�#�#r c � � |}|| j v r0|t t | j � � z }|| j v r�0| j j |� |S r )�
used_names�str�next�numbers�add)r �template�names r �new_namezBaseFix.new_namei sW � � � ���d�o�o�%��c�$�t�|�|�"4�5�5�D� �d�o�o�%������D�!��r c � � | j r/d| _ | j j d| j z � | j j |� y )NFz### In file %s ###)� first_logr �appendr )r �messages r �log_messagezBaseFix.log_messaget s: � ��>�>�"�D�N��H�H�O�O�0�4�=�=�@�A������� r c � � |j � }|j � }d|_ d}| j |||fz � |r| j |� y y )N� zLine %d: could not convert: %s)�
get_lineno�clone�prefixr2 )r r �reason�lineno�
for_output�msgs r �cannot_convertzBaseFix.cannot_convertz s[ � � � ���"���Z�Z�\�
��
��.�������
�3�3�4�����V�$� r c �R � |j � }| j d||fz � y )NzLine %d: %s)r5 r2 )r r r8 r9 s r �warningzBaseFix.warning� s- � � � ���"������&�&�)9�9�:r c � � |j | _ | j |� t j d� | _ d| _ y )Nr T)r&