U if41@sddlmZddlmZmZdddddddd d d d d d d ddddddddddddddddddd d!d!d"d#d$d%d&d'd'd'd(d)d)d*d+d,0Zd-d.Zefd/d0ZGd1d2d2ejZ d3S)4) fixer_base)Name attr_chainiopicklebuiltinscopyregZqueueZ socketserverZ configparserreprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogz tkinter.dndz tkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsz tkinter.tixz tkinter.ttkZtkinterZ _markupbasewinreg_threadZ _dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuz xmlrpc.clientz xmlrpc.serverz http.clientz html.entitiesz html.parserz http.cookieszhttp.cookiejarz http.server subprocess collectionsz urllib.parsezurllib.robotparser)0StringIOZ cStringIOZcPickleZ __builtin__Zcopy_regZQueueZ SocketServerZ ConfigParserreprZ FileDialogZ tkFileDialogZ SimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZ tkMessageBoxZ ScrolledTextZ TkconstantsZTixZttkZTkinterZ markupbase_winregthreadZ dummy_threadZdbhashZdumbdbmZdbmZgdbmZ xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ HTMLParserZCookieZ cookielibZBaseHTTPServerZSimpleHTTPServerZ CGIHTTPServerZcommands UserStringUserListZurlparseZ robotparsercCsddtt|dS)N(|))joinmapr)membersr>/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_imports.py alternates=srccsTddd|D}t|}d||fVd|Vd||fVd|VdS)Nz | cSsg|] }d|qS)zmodule_name='%s'r).0keyrrr Bsz!build_pattern..zyname_import=import_name< 'import' ((%s) | multiple_imports=dotted_as_names< any* (%s) any* >) > zimport_from< 'from' (%s) 'import' ['('] ( any | import_as_name< any 'as' any > | import_as_names< any* >) [')'] > zimport_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* >)rrkeys)mappingZmod_listZ bare_namesrrr build_patternAs r"csTeZdZdZdZeZdZddZfddZ fddZ fd d Z d d Z Z S) FixImportsTcCsdt|jS)Nr)rr"r!selfrrrr"`szFixImports.build_patterncs||_tt|dSN)r"ZPATTERNsuperr#compile_patternr% __class__rrr)cs zFixImports.compile_patterncsHtt|j|}|rDd|kr@tfddt|dDr@dS|SdS)Nbare_with_attrc3s|]}|VqdSr'r)robjmatchrr qsz#FixImports.match..parentF)r(r#r/anyr)r&noderesultsr*r.rr/js zFixImports.matchcstt|||i|_dSr')r(r# start_treereplace)r&Ztreefilenamer*rrr5vszFixImports.start_treecCs|d}|rh|j}|j|}|t||jdd|krD||j|<d|kr||}|r|||n2|dd}|j|j}|r|t||jddS)NZ module_name)prefixZ name_importZmultiple_importsr,)getvaluer!r6rr8r/ transform)r&r3r4Z import_modZmod_namenew_nameZ bare_namerrrr<zs     zFixImports.transform)__name__ __module__ __qualname__Z BM_compatibleZkeep_line_orderMAPPINGr!Z run_orderr"r)r/r5r< __classcell__rrr*rr#Us  r#N) rZ fixer_utilrrrArr"ZBaseFixr#rrrrsj 5