Hacked By AnonymousFox

Current Path : /opt/alt/python35/lib64/python3.5/lib2to3/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/lib2to3/__pycache__/fixer_base.cpython-35.opt-2.pyc



���]"�@slddlZddlmZddlmZddlmZGdd�de�ZGdd	�d	e�Z	dS)
�N�)�PatternCompiler)�pygram)�does_tree_importc@s�eZdZdZdZdZdZdZej	d�Z
e�ZdZ
dZdZdZdZdZejZdd�Zdd	�Zd
d�Zdd
�Zdd�Zddd�Zdd�Zddd�Zdd�Zdd�Zdd�Z dS)�BaseFixNrZpostF�cCs ||_||_|j�dS)N)�options�log�compile_pattern)�selfrr	�r�//opt/alt/python35/lib64/python3.5/fixer_base.py�__init__/s		zBaseFix.__init__cCs@|jdk	r<t�}|j|jdd�\|_|_dS)NZ	with_treeT)�PATTERNrr
�pattern�pattern_tree)r�PCrrr
r
;s	zBaseFix.compile_patterncCs
||_dS)N)�filename)rrrrr
�set_filenameFszBaseFix.set_filenamecCs%d|i}|jj||�o$|S)N�node)r�match)rr�resultsrrr
rMs	z
BaseFix.matchcCs
t��dS)N)�NotImplementedError)rrrrrr
�	transformYszBaseFix.transformZxxx_todo_changemecCsI|}x,||jkr4|tt|j��}q	W|jj|�|S)N)�
used_names�str�next�numbers�add)r�template�namerrr
�new_nameis
zBaseFix.new_namecCs=|jr)d|_|jjd|j�|jj|�dS)NFz### In file %s ###)�	first_logr	�appendr)r�messagerrr
�log_messagets		zBaseFix.log_messagecCsU|j�}|j�}d|_d}|j|||f�|rQ|j|�dS)N�zLine %d: could not convert: %s)�
get_linenoZclone�prefixr%)rr�reason�linenoZ
for_output�msgrrr
�cannot_convertzs	zBaseFix.cannot_convertcCs'|j�}|jd||f�dS)NzLine %d: %s)r'r%)rrr)r*rrr
�warning�szBaseFix.warningcCs8|j|_|j|�tjd�|_d|_dS)NrT)rr�	itertools�countrr")r�treerrrr
�
start_tree�s
zBaseFix.start_treecCsdS)Nr)rr0rrrr
�finish_tree�szBaseFix.finish_tree)!�__name__�
__module__�__qualname__rrrrrr.r/r�setr�orderZexplicitZ	run_orderZ_accept_typeZkeep_line_orderZ
BM_compatiblerZpython_symbolsZsymsrr
rrrr!r%r,r-r1r2rrrr
rs2
		
rcs4eZdZdZ�fdd�Zdd�Z�S)�ConditionalFixNcs#tt|�j|�d|_dS)N)�superr8r1�_should_skip)r�args)�	__class__rr
r1�szConditionalFix.start_treecCsg|jdk	r|jS|jjd�}|d}dj|dd��}t|||�|_|jS)N�.r���r>)r:�skip_on�split�joinr)rrZpkgr rrr
�should_skip�s
zConditionalFix.should_skip)r3r4r5r?r1rBrr)r<r
r8�sr8)
r.Zpatcomprr&rZ
fixer_utilr�objectrr8rrrr
�<module>s
�

Hacked By AnonymousFox1.0, Coded By AnonymousFox