o
    i                     @   sv  d Z ddlmZ ddlmZmZmZmZ ddlm	Z
 ddlmZ ddlmZmZ ddlmZ i dd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)i d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKZdLZdMZdNZdOZdPZdQZdRZdSZdTZdUZdVdW ZG dXdY dYejZdZS )[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reprlibreprwinreg_winregconfigparserConfigParsercopyregcopy_regzmultiprocessing.SimpleQueuez"multiprocessing.queues.SimpleQueuequeueQueuesocketserverSocketServer_markupbase
markupbaseztest.supportztest.test_supportzdbm.bsddbhashzdbm.ndbmdbmzdbm.dumbdumbdbmzdbm.gnugdbmzhtml.parser
HTMLParserzhtml.entitieshtmlentitydefszhttp.clienthttplibzhttp.cookiesCookiezhttp.cookiejar	cookielibztkinter.dialogDialogztkinter._fixZFixTkztkinter.scrolledtextScrolledTextztkinter.tixTixztkinter.constantsTkconstantsztkinter.dndTkdndztkinter.__init__Tkinterztkinter.colorchoosertkColorChooserztkinter.commondialogtkCommonDialogztkinter.fonttkFontztkinter.ttkttkztkinter.messageboxtkMessageBoxztkinter.turtleturtlezurllib.robotparserrobotparserzxmlrpc.client	xmlrpclibbuiltins__builtin__z	name='%s'z	attr='%s'z$dotted_name=dotted_name< %s '.' %s >z%sz"power< %s trailer< '.' %s > any* >zpower< %s any* >z:from_import=import_from< 'from' %s 'import' imported=any >zfrom_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           
      C   s   d| v rA|  dd\} }t|  }t| }t||f }t| }t|||||f }t||f }t||f }t| }	d	|||||	fS t|  }t||f }t| }t
| }d	|||fS )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.
    .    | 
)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attrZsimple_nameZsimple_attrZdotted_nameZi_fromZi_from_submodZi_nameZu_nameZ	u_subname rD   n/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/libpasteurize/fixes/fix_imports.pyall_patternsP   s    rF   c                   @   s6   e Zd Zddd eD ZdeefZdd ZdS )
FixImportsr6   c                 C   s   g | ]}t |qS rD   )rF   ).0rB   rD   rD   rE   
<listcomp>m   s    zFixImports.<listcomp>c                 C   s   t dd| d S )NfutureZstandard_libraryr   )selfnoderesultsrD   rD   rE   	transformp   s   zFixImports.transformN)__name__
__module____qualname__r@   MAPPINGZPATTERNmultiple_name_import_matchrN   rD   rD   rD   rE   rG   k   s    rG   N) __doc__Zlib2to3r   Zlib2to3.fixer_utilr   r   r   r   Zlib2to3.pygramr   ZsymsZlib2to3.pgen2r   Zlib2to3.pytreer	   r
   Zlibfuturize.fixer_utilr   rR   r8   r9   r:   rA   r>   r?   r;   r<   r=   rS   rF   ZBaseFixrG   rD   rD   rD   rE   <module>   s    	
 !"-