AlkantarClanX12

Your IP : 18.226.163.78


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



���]��@ssddlmZddlmZmZdddiiZiZdd�Zdd	�ZGd
d�dej	�Z
dS)
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsddjtt|��dS)N�(�|�))�join�map�repr)�members�r�0/opt/alt/python35/lib64/python3.5/fix_renames.py�
alternatessrccs{xtttj��D]`\}}xQt|j��D]=\}}|t||f<d|||fVd||fVq2WqWdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrrrr�
build_patterns

rcsLeZdZdZdje��ZdZ�fdd�Zdd�Z	�S)�
FixRenamesTr�precsXtt|�j��|�}|rTt�fdd�t|d�D��rPdS|SdS)Nc3s|]}�|�VqdS)Nr)�.0�obj)�matchrr�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results)�	__class__)rrr1s(zFixRenames.matchcCs`|jd�}|jd�}|r\|r\t|j|jf}|jt|d|j��dS)N�module_name�	attr_name�prefix)�getr�valuerrr()r"r#r$Zmod_namer'rrrr�	transform>s
zFixRenames.transform)
�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr+rr)r%rr*s

rN)�rZ
fixer_utilrrrrrrZBaseFixrrrrr�<module>
s