HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/libpasteurize/fixes/__pycache__/fix_imports.cpython-38.pyc
U

,�]P�"@s�dZddlmZddlmZmZmZmZddlm	Z
ddlmZddl
mZmZddlmZdd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)�!Zd*Zd+Zd,Zd-Zd.Zd/Zd0Zd1Zd2Zd3Zd4d5�ZGd6d7�d7ej�Zd8S)9z8
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�ConfigParserZcopy_regZQueueZSocketServerZ
markupbaseztest.test_supportZdbhashZdbmZdumbdbmZgdbmZ
HTMLParserZhtmlentitydefsZhttplibZCookieZ	cookielibZDialogZFixTkZScrolledTextZTixZTkconstantsZTkdndZTkinterZtkColorChooserZtkCommonDialogZtkFontZttkZtkMessageBoxZturtleZrobotparserZ	xmlrpclibZ__builtin__)!�reprlib�winreg�configparser�copyregZqueueZsocketserverZ_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�|�dd�\}}t|}t|}t||f}t|}t|||||f}t||f}t||f}t|}	d�	|||||	f�St|}t||f}t|}t
|}d�	|||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.
    �.�� | 
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�r%�A/usr/lib/python3/dist-packages/libpasteurize/fixes/fix_imports.py�all_patternsOs r'c@s6eZdZd�dd�eD��Zd�eef�Zdd�ZdS)�
FixImportsrcCsg|]}t|��qSr%)r')�.0r#r%r%r&�
<listcomp>lszFixImports.<listcomp>cCstdd|�dS)NZfutureZstandard_libraryr)�selfZnodeZresultsr%r%r&�	transformoszFixImports.transformN)�__name__�
__module__�__qualname__r!�MAPPINGZPATTERN�multiple_name_import_matchr,r%r%r%r&r(jsr(N) �__doc__Zlib2to3rZlib2to3.fixer_utilrrrrZlib2to3.pygramrZsymsZ
lib2to3.pgen2rZlib2to3.pytreer	r
Zlibfuturize.fixer_utilrr0rrrr"rr rrrr1r'ZBaseFixr(r%r%r%r&�<module>sh�,