HOME


sh-3ll 1.0
DIR:/usr/local/lib/python3.6/site-packages/libpasteurize/fixes/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/libpasteurize/fixes/__pycache__/fix_imports.cpython-36.pyc
3

+��h��#@s�dZddlmZddlmZmZmZmZddlm	Z
ddlmZddl
mZmZddlmZdd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*�"Zd+Zd,Zd-Zd.Zd/Zd0Zd1Zd2Zd3Zd4Zd5d6�ZGd7d8�d8ej�Zd9S):z8
Fixer for standard library imports renamed in Python 3
�)�
fixer_base)�Name�is_probably_builtin�Newline�does_tree_import)�python_symbols)�token)�Node�Leaf)�touch_import_top�repr�_winreg�ConfigParser�copy_regz"multiprocessing.queues.SimpleQueue�Queue�SocketServer�
markupbaseztest.test_support�dbhash�dbm�dumbdbm�gdbm�
HTMLParser�htmlentitydefs�httplib�Cookie�	cookielib�DialogZFixTk�ScrolledText�Tix�Tkconstants�Tkdnd�Tkinter�tkColorChooser�tkCommonDialog�tkFont�ttk�tkMessageBoxZturtle�robotparser�	xmlrpclib�__builtin__)"�reprlib�winreg�configparser�copyregzmultiprocessing.SimpleQueue�queue�socketserver�_markupbaseztest.supportzdbm.bsdzdbm.ndbmzdbm.dumbzdbm.gnuzhtml.parserz
html.entitieszhttp.clientzhttp.cookieszhttp.cookiejarztkinter.dialogztkinter._fixztkinter.scrolledtextztkinter.tixztkinter.constantsztkinter.dndztkinter.__init__ztkinter.colorchooserztkinter.commondialogztkinter.fontztkinter.ttkztkinter.messageboxztkinter.turtlezurllib.robotparserz
xmlrpc.client�builtinsz	name='%s'z	attr='%s'z$dotted_name=dotted_name< %s '.' %s >z%sz"power< %s trailer< '.' %s > any* >zpower< %s any* >z:from_import=import_from< 'from' %s 'import' imported=any >z�from_import_submod=import_from< 'from' %s 'import' (%s | import_as_name< %s 'as' renamed=any > | import_as_names< any* (%s | import_as_name< %s 'as' renamed=any >) any* > ) >zrname_import=import_name< 'import' %s > | name_import=import_name< 'import' dotted_as_name< %s 'as' renamed=any > >zAname_import=import_name< 'import' dotted_as_names< names=any* > >c
Cs�d|kr�|jdd�\}}t|}t|}t||f}t|}t|||||f}t||f}t||f}t|}	dj	|||||	f�St|}t||f}t|}t
|}dj	|||f�SdS)z�
    Accepts a string and returns a pattern of possible patterns involving that name
    Called by simple_mapping_to_pattern for each name in the mapping it receives.
    �.�z | 
N)�split�simple_name_match�
subname_match�dotted_name_match�from_import_match�from_import_submod_match�name_import_match�power_twoname_match�power_subname_match�join�power_onename_match)
�name�attrZsimple_nameZsimple_attrZdotted_nameZi_fromZ
i_from_submodZi_nameZu_nameZ	u_subname�rA�F/root/tmp/pip-build-yeh9mt8d/future/libpasteurize/fixes/fix_imports.py�all_patternsPs rCc@s6eZdZdjdd�eD��Zdjeef�Zdd�ZdS)�
FixImportsz | 
cCsg|]}t|��qSrA)rC)�.0r?rArArB�
<listcomp>mszFixImports.<listcomp>cCstdd|�dS)N�futureZstandard_library)r)�self�node�resultsrArArB�	transformpszFixImports.transformN)�__name__�
__module__�__qualname__r=�MAPPINGZPATTERN�multiple_name_import_matchrKrArArArBrDksrDN) �__doc__Zlib2to3rZlib2to3.fixer_utilrrrrZlib2to3.pygramrZsymsZ
lib2to3.pgen2rZlib2to3.pytreer	r
Zlibfuturize.fixer_utilrrOr5r6r7r>r;r<r8r9r:rPrCZBaseFixrDrArArArB�<module>sh