Your IP : 3.133.141.201


Current Path : /opt/alt/python310/lib64/python3.10/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/lib2to3/fixes/__pycache__/fix_imports.cpython-310.pyc

o

6��f4�@s@dZddlmZddlmZmZidd�dd�dd�d	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"�id#d$�d%d&�d'd(�d)d*�d+d,�d-d.�d/d0�d1d2�d3d4�d5d6�d7d8�d9d:�d;d<�d=d>�d?d@�dAdB�dCdD��dDdEdFdGdHdIdJdJdJdKdLdLdMdNdO��ZdPdQ�ZefdRdS�ZGdTdU�dUej	�Z
dVS)Wz/Fix incompatible imports and module references.�)�
fixer_base)�Name�
attr_chain�StringIO�ioZ	cStringIOZcPickle�pickleZ__builtin__�builtinsZcopy_reg�copyregZQueue�queueZSocketServerZsocketserverZConfigParserZconfigparser�repr�reprlibZ
FileDialogztkinter.filedialogZtkFileDialogZSimpleDialogztkinter.simpledialogZtkSimpleDialogZtkColorChooserztkinter.colorchooserZtkCommonDialogztkinter.commondialogZDialogztkinter.dialogZTkdndztkinter.dndZtkFontztkinter.fontZtkMessageBoxztkinter.messageboxZScrolledTextztkinter.scrolledtextZTkconstantsztkinter.constantsZTixztkinter.tixZttkztkinter.ttkZTkinterZtkinterZ
markupbaseZ_markupbaseZ_winreg�winreg�thread�_threadZdummy_threadZ
_dummy_threadZdbhashzdbm.bsdZdumbdbmzdbm.dumbZdbmzdbm.ndbmZgdbmzdbm.gnuZ	xmlrpclibz
xmlrpc.clientZDocXMLRPCServerz
xmlrpc.serverzhttp.clientz
html.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.server�
subprocess�collectionszurllib.parsezurllib.robotparser)ZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServerZcommands�
UserString�UserListZurlparseZrobotparsercCsdd�tt|��dS)N�(�|�))�join�mapr)�members�r�@/opt/alt/python310/lib64/python3.10/lib2to3/fixes/fix_imports.py�
alternates=srccsV�d�dd�|D��}t|���}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bsz!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"csTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�
FixImportsT�cCsd�t|j��S)Nr)rr"r!��selfrrrr"`szFixImports.build_patterncs|��|_tt|���dS�N)r"ZPATTERN�superr#�compile_patternr%��	__class__rrr)cs
zFixImports.compile_patterncsHtt|�j��|�}|r"d|vr t�fdd�t|d�D��r dS|SdS)N�bare_with_attrc3s�|]}�|�VqdSr'r)r�obj��matchrr�	<genexpr>qs�z#FixImports.match.<locals>.<genexpr>�parentF)r(r#r/�anyr)r&�node�resultsr*r.rr/js�zFixImports.matchcstt|��||�i|_dSr')r(r#�
start_tree�replace)r&Ztree�filenamer*rrr5vs
zFixImports.start_treecCs�|�d�}|r9|j}|j|}|�t||jd��d|vr"||j|<d|vr5|�|�}|r7|�||�dSdSdS|dd}|j�|j�}|rT|�t||jd��dSdS)NZmodule_name)�prefixZname_importZmultiple_importsr,�)�get�valuer!r6rr8r/�	transform)r&r3r4Z
import_modZmod_name�new_nameZ	bare_namerrrr<zs$



��zFixImports.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGr!Z	run_orderr"r)r/r5r<�
__classcell__rrr*rr#Usr#N)�__doc__�rZ
fixer_utilrrrArr"ZBaseFixr#rrrr�<module>s���������	�
���
������������������ �!�"�#�5

?>