AlkantarClanX12

Your IP : 18.117.106.23


Current Path : /lib64/python3.6/lib2to3/__pycache__/
Upload File :
Current File : //lib64/python3.6/lib2to3/__pycache__/fixer_base.cpython-36.opt-2.pyc

3


 \"�@sPddlZddlmZddlmZddlmZGdd�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�*/usr/lib64/python3.6/lib2to3/fixer_base.py�__init__/szBaseFix.__init__cCs,|jdk	r(t�}|j|jdd�\|_|_dS)NT)Z	with_tree)�PATTERNrr
�pattern�pattern_tree)r�PCrrr
r
;s
zBaseFix.compile_patterncCs
||_dS)N)�filename)rrrrr
�set_filenameFszBaseFix.set_filenamecCsd|i}|jj||�o|S)N�node)r�match)rr�resultsrrr
rMs	z
BaseFix.matchcCs
t��dS)N)�NotImplementedError)rrrrrr
�	transformYszBaseFix.transform�xxx_todo_changemecCs6|}x ||jkr$|tt|j��}qW|jj|�|S)N)�
used_names�str�next�numbers�add)r�template�namerrr
�new_nameis
zBaseFix.new_namecCs.|jrd|_|jjd|j�|jj|�dS)NFz### In file %s ###)�	first_logr	�appendr)r�messagerrr
�log_messagetszBaseFix.log_messagecCs>|j�}|j�}d|_d}|j|||f�|r:|j|�dS)N�zLine %d: could not convert: %s)�
get_linenoZclone�prefixr&)rr�reason�linenoZ
for_output�msgrrr
�cannot_convertzszBaseFix.cannot_convertcCs|j�}|jd||f�dS)NzLine %d: %s)r(r&)rrr*r+rrr
�warning�szBaseFix.warningcCs(|j|_|j|�tjd�|_d|_dS)NrT)rr�	itertools�countrr#)r�treerrrr
�
start_tree�s
zBaseFix.start_treecCsdS)Nr)rr1rrrr
�finish_tree�szBaseFix.finish_tree)r)N)!�__name__�
__module__�__qualname__rrrrrr/r0r�setr�orderZexplicitZ	run_orderZ_accept_typeZkeep_line_orderZ
BM_compatiblerZpython_symbolsZsymsrr
rrrr"r&r-r.r2r3rrrr
rs2




rcs(eZdZdZ�fdd�Zdd�Z�ZS)�ConditionalFixNcstt|�j|�d|_dS)N)�superr9r2�_should_skip)r�args)�	__class__rr
r2�szConditionalFix.start_treecCsJ|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)r4r5r6r@r2rC�
__classcell__rr)r=r
r9�sr9)
r/Zpatcomprr'rZ
fixer_utilr�objectrr9rrrr
�<module>s