
    4pf                        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dV Z G dW dXej                  ZdYS )Zz8
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._fix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                    d| v r|                      dd          \  } }t          | z  }t          |z  }t          ||fz  }t          |z  }t
          |||||fz  }t          ||fz  }t          ||fz  }t          |z  }	d	                    |||||	f          S t          | z  }t          ||fz  }t          |z  }t          |z  }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attrsimple_namesimple_attrdotted_namei_fromi_from_submodi_nameu_name	u_subnames
             _/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/libpasteurize/fixes/fix_imports.pyall_patternsrP   P   s     t||ZZa((
d'40#t,';*DD"k20Kk[fhs3tt"k;%??$['AA';7	}}ffmVYOPPP'40"k;%??"k2$4}}fff5666    c                       e Zd Zd                    d eD                       Zd                    eef          Zd ZdS )
FixImportsr9   c                 ,    g | ]}t          |          S  )rP   ).0rE   s     rO   
<listcomp>zFixImports.<listcomp>m   s     DDDD\$//DDDrQ   c                 (    t          dd|           d S )Nfuturestandard_libraryr   )selfnoderesultss      rO   	transformzFixImports.transformp   s    $7>>>>>rQ   N)__name__
__module____qualname__rC   MAPPINGPATTERNmultiple_name_import_matchr^   rU   rQ   rO   rS   rS   k   sZ        mmDDGDDDEEGmmW&@ABBG? ? ? ? ?rQ   rS   N) __doc__lib2to3r   lib2to3.fixer_utilr   r   r   r   lib2to3.pygramr   symslib2to3.pgen2r	   lib2to3.pytreer
   r   libfuturize.fixer_utilr   rb   r;   r<   r=   rD   rA   rB   r>   r?   r@   rd   rP   BaseFixrS   rU   rQ   rO   <module>rn      s          S S S S S S S S S S S S 1 1 1 1 1 1       % % % % % % % % 3 3 3 3 3 3#:w #j#O# {# *+P	#
 X# O# =# 0# y# # 
# w# =# .# :#  I!# #" l##& i'#( H)#* #O+#, 6-#.  /#0 81#2 
3#4 #$55#6 #$57#8 I9#: 6;#< !/=#> i?#@ !.A#B \C#D E# #Z ! ;  ; ) Q  M  J a 7 7 76? ? ? ? ?# ? ? ? ? ?rQ   