Hacked By AnonymousFox

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.pyc



��Yf��@sydZddlmZddlmZmZdddiiZiZdd�Zd	d
�Z	Gdd�dej
�Zd
S)z?Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsddjtt|��dS)N�(�|�))�join�map�repr)Zmembers�r
�>/opt/alt/python35/lib64/python3.5/lib2to3/fixes/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_attrr
r
r�
build_patterns

rcsLeZdZdZdje��ZdZ�fdd�Zdd�Z	�S)�
FixRenamesTrZprecsXtt|�j��|�}|rTt�fdd�t|d�D��rPdS|SdS)Nc3s|]}�|�VqdS)Nr
)�.0�obj)�matchr
r�	<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)NZmodule_name�	attr_name�prefix)�getr�valuerrr%)r r!r"Zmod_namer$rr
r
r�	transform>s
zFixRenames.transform)
�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr(r
r
)r#rr*s

rN)�__doc__�rZ
fixer_utilrrrrrrZBaseFixrr
r
r
r�<module>s

Hacked By AnonymousFox1.0, Coded By AnonymousFox