AlkantarClanX12

Your IP : 18.119.125.61


Current Path : /opt/alt/python34/lib64/python3.4/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/lib2to3/fixes/__pycache__/fix_imports.cpython-34.pyc

�
i f4�@s�dZddlmZddlmZmZi0dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dCdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dPdR6dPdS6dTdU6dVdW6dVdX6dYdZ6d[d\6Zd]d^�Zed_d`�ZGdadb�dbej	�Z
dcS)dz/Fix incompatible imports and module references.�)�
fixer_base)�Name�
attr_chain�io�StringIOZ	cStringIO�pickleZcPickle�builtinsZ__builtin__�copyregZcopy_regZqueueZQueueZsocketserverZSocketServerZconfigparserZConfigParser�reprlib�reprztkinter.filedialogZ
FileDialogZtkFileDialogztkinter.simpledialogZSimpleDialogZtkSimpleDialogztkinter.colorchooserZtkColorChooserztkinter.commondialogZtkCommonDialogztkinter.dialogZDialogztkinter.dndZTkdndztkinter.fontZtkFontztkinter.messageboxZtkMessageBoxztkinter.scrolledtextZScrolledTextztkinter.constantsZTkconstantsztkinter.tixZTixztkinter.ttkZttkZtkinterZTkinterZ_markupbaseZ
markupbase�winreg�_winreg�_threadZthreadZ
_dummy_threadZdummy_threadzdbm.bsdZdbhashzdbm.dumbZdumbdbmzdbm.ndbmZdbmzdbm.gnuZgdbmz
xmlrpc.clientZ	xmlrpclibz
xmlrpc.serverZDocXMLRPCServerZSimpleXMLRPCServerzhttp.clientZhttplibz
html.entitiesZhtmlentitydefszhtml.parserZ
HTMLParserzhttp.cookiesZCookiezhttp.cookiejarZ	cookielibzhttp.serverZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServer�
subprocessZcommands�collections�
UserString�UserListzurllib.parseZurlparsezurllib.robotparserZrobotparsercCsddjtt|��dS)N�(�|�))�join�mapr)Zmembers�r�>/opt/alt/python34/lib64/python3.4/lib2to3/fixes/fix_imports.py�
alternates=srccsbdjdd�|D��}t|j��}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bs	z!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z�import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z�import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rr�keys)�mappingZmod_listZ
bare_namesrrr�
build_patternAs	r csveZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�S)
�
FixImportsT�cCsdjt|j��S)Nr)rr r)�selfrrrr `szFixImports.build_patterncs&|j�|_tt|�j�dS)N)r ZPATTERN�superr!�compile_pattern)r#)�	__class__rrr%cszFixImports.compile_patterncsdtt|�j��|�}|r`d|kr\t�fdd�t|d�D��r\dS|SdS)N�bare_with_attrc3s|]}�|�VqdS)Nr)r�obj)�matchrr�	<genexpr>qsz#FixImports.match.<locals>.<genexpr>�parentF)r$r!r)�anyr)r#�node�results)r&)r)rr)js(zFixImports.matchcs&tt|�j||�i|_dS)N)r$r!�
start_tree�replace)r#Ztree�filename)r&rrr/vszFixImports.start_treecCs�|jd�}|r�|j}|j|}|jt|d|j��d|krc||j|<nd|kr�|j|�}|r�|j||�q�q�nH|dd}|jj|j�}|r�|jt|d|j��ndS)NZmodule_name�prefixZname_importZmultiple_importsr'�)�get�valuerr0rr2r)�	transform)r#r-r.Z
import_modZmod_name�new_nameZ	bare_namerrrr6zs	
zFixImports.transform)
�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGrZ	run_orderr r%r)r/r6rr)r&rr!Usr!N)�__doc__�rZ
fixer_utilrrr;rr ZBaseFixr!rrrr�<module>sj