Hacked By AnonymousFox

Current Path : /opt/alt/python310/lib64/python3.10/lib2to3/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/lib2to3/__pycache__/fixer_base.cpython-310.opt-2.pyc

o

6��f"�@sR	ddlZddlmZddlmZddlmZGdd�de�ZGdd	�d	e�Z	dS)
�N�)�PatternCompiler)�pygram)�does_tree_importc@s�eZdZ	dZdZdZdZdZe�	d�Z
e�ZdZ
dZdZdZdZdZejZdd�Zdd	�Zd
d�Zdd
�Zdd�Zddd�Zdd�Zddd�Zdd�Zdd�Zdd�Z dS)�BaseFixNrZpostF�cCs	||_||_|��dS�N)�options�log�compile_pattern)�selfr	r
�r
�9/opt/alt/python310/lib64/python3.10/lib2to3/fixer_base.py�__init__/szBaseFix.__init__cCs2	|jdurt�}|j|jdd�\|_|_dSdS)NT)Z	with_tree)�PATTERNrr�pattern�pattern_tree)rZPCr
r
rr;s
��zBaseFix.compile_patterncCs	||_dSr)�filename)rrr
r
r�set_filenameFs
zBaseFix.set_filenamecCs	d|i}|j�||�o
|S)N�node)r�match�rrZresultsr
r
rrMsz
BaseFix.matchcCs	t��r)�NotImplementedErrorrr
r
r�	transformYs
zBaseFix.transform�xxx_todo_changemecCs<	|}||jvr|tt|j��}||jvs|j�|�|Sr)�
used_names�str�next�numbers�add)r�template�namer
r
r�new_nameis

�zBaseFix.new_namecCs.|jrd|_|j�d|j�|j�|�dS)NFz### In file %s ###)�	first_logr
�appendr)r�messager
r
r�log_messagetszBaseFix.log_messagecCsD	|��}|��}d|_d}|�|||f�|r |�|�dSdS)N�zLine %d: could not convert: %s)�
get_linenoZclone�prefixr&)rr�reason�linenoZ
for_output�msgr
r
r�cannot_convertzs�zBaseFix.cannot_convertcCs 	|��}|�d||f�dS)NzLine %d: %s)r(r&)rrr*r+r
r
r�warning�szBaseFix.warningcCs*	|j|_|�|�t�d�|_d|_dS)NrT)rr�	itertools�countrr#�rZtreerr
r
r�
start_tree�s


zBaseFix.start_treecCs	dSrr
r1r
r
r�finish_tree�szBaseFix.finish_tree)rr)!�__name__�
__module__�__qualname__rrrr	rr/r0r�setrZorderZexplicitZ	run_orderZ_accept_typeZkeep_line_orderZ
BM_compatiblerZpython_symbolsZsymsrrrrrr"r&r-r.r2r3r
r
r
rrs6



rcs*eZdZ	dZ�fdd�Zdd�Z�ZS)�ConditionalFixNcstt|�j|�d|_dSr)�superr8r2�_should_skip)r�args��	__class__r
rr2�s
zConditionalFix.start_treecCsJ|jdur|jS|j�d�}|d}d�|dd��}t|||�|_|jS)N�.���)r:�skip_on�split�joinr)rrZpkgr!r
r
r�should_skip�s
zConditionalFix.should_skip)r4r5r6r@r2rC�
__classcell__r
r
r<rr8�s
r8)
r/Zpatcomprr'rZ
fixer_utilr�objectrr8r
r
r
r�<module>s

Hacked By AnonymousFox1.0, Coded By AnonymousFox