Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.6/site-packages/libfuturize/fixes/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/libfuturize/fixes/__pycache__/fix_UserDict.cpython-36.pyc

3

�uGh�@sPdZddlmZddlmZmZddlmZmZm	Z	ddiZ
Gdd�de	�Zd	S)
zCFix UserDict.

Incomplete!

TODO: base this on fix_urllib perhaps?
�)�
fixer_base)�Name�
attr_chain)�
alternates�
build_pattern�
FixImports�UserDict�collectionscsTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�FixUserdictT�cCsdjt|j��S)N�|)�joinr�mapping)�self�r�E/root/tmp/pip-build-gzoz1_uw/future/libfuturize/fixes/fix_UserDict.pyr5szFixUserdict.build_patterncs|j�|_tt|�j�dS)N)rZPATTERN�superr�compile_pattern)r)�	__class__rrr8s
zFixUserdict.compile_patterncsHtt|�j��|�}|rDd|kr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdS)Nr)�.0�obj)�matchrr�	<genexpr>Fsz$FixUserdict.match.<locals>.<genexpr>�parentF)rrr�anyr)r�node�results)r)rrr?szFixUserdict.matchcstt|�j||�i|_dS)N)rr�
start_tree�replace)r�tree�filename)rrrrKszFixUserdict.start_treecCs�|jd�}|rl|j}t|j|�}|jt||jd��d|krH||j|<d|kr�|j|�}|r�|j||�n2|dd}|jj|j�}|r�|jt||jd��dS)N�module_name)�prefixZname_importZmultiple_importsrr)	�get�value�unicoderrrr#r�	transform)rrrZ
import_mod�mod_name�new_nameZ	bare_namerrrr'Os


zFixUserdict.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGrZ	run_orderrrrrr'�
__classcell__rr)rrr
*sr
N)�__doc__Zlib2to3rZlib2to3.fixer_utilrrZlib2to3.fixes.fix_importsrrrr-r
rrrr�<module>s


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists