tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Y\¬Qc@szdZddlmZddlmZmZmZmZddlm    Z    m
Z
m Z d„Z dej fd„ƒYZd    S(
sÞFixer for import statements.
If spam is being imported from the local directory, this import:
    from spam import eggs
Becomes:
    from .spam import eggs
 
And this import:
    import spam
Becomes:
    from . import spam
i(t
fixer_baseiÿÿÿÿ(tdirnametjointexiststsep(t
FromImporttsymsttokenccsæ|g}xÖ|rá|jƒ}|jtjkr;|jVq |jtjkrwdjg|jD]}|j^q]ƒVq |jtj    kr |j
|jdƒq |jtj krÒ|j |jddd…ƒq t dƒ‚q WdS(sF
    Walks over all the names imported in a dotted_as_names node.
    tiNiþÿÿÿsunkown node type(tpopttypeRtNAMEtvalueRt dotted_nameRtchildrentdotted_as_nametappendtdotted_as_namestextendtAssertionError(tnamestpendingtnodetch((s`/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_import.pyttraverse_importss          * t    FixImportcBs/eZeZdZd„Zd„Zd„ZRS(sj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cCs/tt|ƒj||ƒd|jk|_dS(Ntabsolute_import(tsuperRt
start_treetfuture_featurestskip(tselfttreetname((s`/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_import.pyR/scCs|jr dS|d}|jtjkr~x t|dƒsK|jd}q,W|j|jƒrd|j|_|jƒqn†t    }t    }x2t
|ƒD]$}|j|ƒrµt }q—t }q—W|râ|rÞ|j |dƒndSt d|gƒ}|j|_|SdS(NtimpR iu.s#absolute and local imports together(RR
Rt import_fromthasattrRtprobably_a_local_importR tchangedtFalseRtTruetwarningRtprefix(RRtresultsR"t
have_localt have_absolutetmod_nametnew((s`/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_import.pyt    transform3s,    
    
 cCs¡|jdƒrtS|jddƒd}t|jƒ}t||ƒ}ttt|ƒdƒƒsftSx4dtdddd    gD]}t||ƒrtSqWtS(
Nu.iis __init__.pys.pys.pycs.sos.sls.pyd(    t
startswithR'tsplitRtfilenameRRRR((Rtimp_namet    base_pathtext((s`/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_import.pyR%Us(t__name__t
__module__R(t BM_compatibletPATTERNRR0R%(((s`/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_import.pyR&s
        "N(t__doc__RRtos.pathRRRRt
fixer_utilRRRRtBaseFixR(((s`/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_import.pyt<module> s
"