a 97aPã"@sêdZddlmZddlmZmZmZmZddlm Z ddl m Z ddl mZmZddlmZdd d d d 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Ú ConfigParserÚcopy_regÚQueueÚ SocketServerÚ markupbaseztest.test_supportÚdbhashÚdbmÚdumbdbmÚgdbmÚ HTMLParserÚhtmlentitydefsÚhttplibÚCookieÚ cookielibÚDialogZFixTkÚ ScrolledTextÚTixÚ TkconstantsÚTkdndÚTkinterÚtkColorChooserÚtkCommonDialogÚtkFontÚttkÚ tkMessageBoxZturtleÚ robotparserÚ xmlrpclibÚ __builtin__)!ÚreprlibÚwinregÚ configparserÚcopyregÚqueueÚ socketserverÚ _markupbasez test.supportzdbm.bsdzdbm.ndbmzdbm.dumbzdbm.gnuz html.parserz html.entitiesz http.clientz http.cookieszhttp.cookiejarztkinter.dialogz tkinter._fixztkinter.scrolledtextz tkinter.tixztkinter.constantsz tkinter.dndztkinter.__init__ztkinter.colorchooserztkinter.commondialogz tkinter.fontz tkinter.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|vr‚| 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ÚattrZ simple_nameZ simple_attrZ dotted_nameZi_fromZ i_from_submodZi_nameZu_nameZ u_subname©rCúz/private/var/folders/s6/9n5zrl012gv99k63s4q6ccsd4s6mqz/T/pip-target-f5cq3f2q/lib/python/libpasteurize/fixes/fix_imports.pyÚ all_patternsOs     rEc@s6eZdZd dd„eDƒ¡Zd eef¡Zdd„ZdS)Ú FixImportsr5cCsg|] }t|ƒ‘qSrC)rE)Ú.0rArCrCrDÚ lózFixImports.cCstdd|ƒdS)NÚfutureZstandard_libraryr )ÚselfÚnodeÚresultsrCrCrDÚ transformoszFixImports.transformN)Ú__name__Ú __module__Ú __qualname__r?ÚMAPPINGZPATTERNÚmultiple_name_import_matchrNrCrCrCrDrFjsrFN) Ú__doc__Zlib2to3rZlib2to3.fixer_utilrrrrZlib2to3.pygramrZsymsZ lib2to3.pgen2rZlib2to3.pytreer r Zlibfuturize.fixer_utilr rRr7r8r9r@r=r>r:r;r<rSrEZBaseFixrFrCrCrCrDÚsh    ß,