Viewing File: /opt/alt/python35/lib64/python3.5/lib2to3/fixes/__pycache__/fix_imports.cpython-35.opt-1.pyc



¯ÕYf4ã`@sŠdZddlmZddlmZmZddddddd	d
ddd
ddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdDdFdGdHdIdJdKdLdMdNdOdPdQdRdQdSdQdTdUdVdWdXdWdYdZd[d\i0Zd]d^„Zed_d`„ZGdadb„dbej	ƒZ
dcS)dz/Fix incompatible imports and module references.é)Ú
fixer_base)ÚNameÚ
attr_chainÚStringIOÚioZ	cStringIOZcPickleÚpickleZ__builtin__ÚbuiltinsZcopy_regÚcopyregZQueueZqueueZ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_markupbaseÚ_winregÚwinregZthreadÚ_threadZdummy_threadZ
_dummy_threadZdbhashzdbm.bsdZdumbdbmzdbm.dumbZdbmzdbm.ndbmZgdbmzdbm.gnuZ	xmlrpclibz
xmlrpc.clientZDocXMLRPCServerz
xmlrpc.serverZSimpleXMLRPCServerZhttplibzhttp.clientZhtmlentitydefsz
html.entitiesZ
HTMLParserzhtml.parserZCookiezhttp.cookiesZ	cookielibzhttp.cookiejarZBaseHTTPServerzhttp.serverZSimpleHTTPServerZ
CGIHTTPServerZcommandsÚ
subprocessÚ
UserStringÚcollectionsÚUserListZurlparsezurllib.parseZrobotparserzurllib.robotparsercCsddjtt|ƒƒdS)Nú(ú|ú))ÚjoinÚmapr
)Zmembers©rú>/opt/alt/python35/lib64/python3.5/lib2to3/fixes/fix_imports.pyÚ
alternates=srccsbdjdd„|Dƒƒ}t|jƒƒ}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|‘qS)zmodule_name='%s'r)Ú.0Úkeyrrrú
<listcomp>Bs	z!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 csveZdZdZdZeZdZdd„Z‡fdd†Z	‡fdd†Z
‡fd	d
†Zdd„Z‡S)
Ú
FixImportsTécCsdjt|jƒƒS)Nr)rr r)Úselfrrrr `szFixImports.build_patterncs&|jƒ|_tt|ƒjƒdS)N)r ZPATTERNÚsuperr!Úcompile_pattern)r#)Ú	__class__rrr%cszFixImports.compile_patterncsdtt|ƒj‰ˆ|ƒ}|r`d|kr\t‡fdd†t|dƒDƒƒr\dS|SdS)NÚbare_with_attrc3s|]}ˆ|ƒVqdS)Nr)rÚobj)Úmatchrrú	<genexpr>qsz#FixImports.match.<locals>.<genexpr>ÚparentF)r$r!r)Úanyr)r#ÚnodeÚresults)r&)r)rr)js(zFixImports.matchcs&tt|ƒj||ƒi|_dS)N)r$r!Ú
start_treeÚreplace)r#ZtreeÚfilename)r&rrr/vszFixImports.start_treecCsÝ|jdƒ}|r”|j}|j|}|jt|d|jƒƒd|kr`||j|<d|krÙ|j|ƒ}|rÙ|j||ƒnE|dd}|jj|jƒ}|rÙ|jt|d|jƒƒdS)NZmodule_nameÚprefixZname_importZmultiple_importsr'é)ÚgetÚvaluerr0rr2r)Ú	transform)r#r-r.Z
import_modZmod_nameÚnew_nameZ	bare_namerrrr6zs	

zFixImports.transform)
Ú__name__Ú
__module__Ú__qualname__Z
BM_compatibleZkeep_line_orderÚMAPPINGrZ	run_orderr r%r)r/r6rr)r&rr!Usr!N)Ú__doc__ÚrZ
fixer_utilrrr;rr ZBaseFixr!rrrrÚ<module>sj
Back to Directory File Manager