MINI MINI MANI MO

Path : /usr/lib64/python3.6/lib2to3/fixes/__pycache__/
File Upload :
Current File : //usr/lib64/python3.6/lib2to3/fixes/__pycache__/fix_import.cpython-36.opt-2.pyc

3


 \¸ã@sVddlmZddlmZmZmZmZddlmZm	Z	m
Z
dd„ZGdd„dejƒZ
d	S)
é)Ú
fixer_baseé)ÚdirnameÚjoinÚexistsÚsep)Ú
FromImportÚsymsÚtokenccs¢|g}x–|rœ|jƒ}|jtjkr*|jVq|jtjkrPdjdd„|jDƒƒVq|jtj	krn|j
|jdƒq|jtjkr’|j|jddd…ƒqt
dƒ‚qWdS)NÚcSsg|]
}|j‘qS©)Úvalue)Ú.0Zchrrú0/usr/lib64/python3.6/lib2to3/fixes/fix_import.pyú
<listcomp>sz$traverse_imports.<locals>.<listcomp>rrzunknown node typeéþÿÿÿ)ÚpopÚtyper
ÚNAMEr
r	Zdotted_namerÚchildrenZdotted_as_nameÚappendZdotted_as_namesÚextendÚAssertionError)ÚnamesÚpendingÚnoderrrÚtraverse_importss
rcs4eZdZdZdZ‡fdd„Zdd„Zdd„Z‡ZS)	Ú	FixImportTzj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cs"tt|ƒj||ƒd|jk|_dS)NZabsolute_import)ÚsuperrÚ
start_treeZfuture_featuresÚskip)ÚselfZtreeÚname)Ú	__class__rrr/szFixImport.start_treecCs¼|jr
dS|d}|jtjkrZxt|dƒs6|jd}q W|j|jƒr¸d|j|_|jƒn^d}d}x$t	|ƒD]}|j|ƒr€d}qld}qlW|r |rœ|j
|dƒdStd|gƒ}|j|_|SdS)NÚimpr
rÚ.FTz#absolute and local imports together)
r rr	Zimport_fromÚhasattrrÚprobably_a_local_importr
ZchangedrZwarningrÚprefix)r!rZresultsr$Z
have_localZ
have_absoluteZmod_nameÚnewrrrÚ	transform3s,

zFixImport.transformcCsv|jdƒrdS|jddƒd}t|jƒ}t||ƒ}ttt|ƒdƒƒsHdSx(dtddd	d
gD]}t||ƒrZdSqZWdS)Nr%Férz__init__.pyz.pyz.pycz.soz.slz.pydT)Ú
startswithÚsplitrÚfilenamerrr)r!Zimp_nameÚ	base_pathZextrrrr'Us


z!FixImport.probably_a_local_import)	Ú__name__Ú
__module__Ú__qualname__Z
BM_compatibleZPATTERNrr*r'Ú
__classcell__rr)r#rr&s
"rN)rrZos.pathrrrrZ
fixer_utilrr	r
rZBaseFixrrrrrÚ<module>s

OHA YOOOO