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
Y\¬Qc@sdZddlmZddlmZddlmZddlm    Z    m
Z
m Z dZ dej fd„ƒYZd    „Zd
„Zd „Zd S( s.Fixer for it.next() -> next(it), per PEP 3114.i(ttoken(tpython_symbols(t
fixer_base(tNametCallt find_bindings;Calls to builtin next() possibly shadowed by global bindingtFixNextcBs,eZeZdZdZd„Zd„ZRS(s¾
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    tprecCsWtt|ƒj||ƒtd|ƒ}|rJ|j|tƒt|_n    t|_dS(Nunext(    tsuperRt
start_treeRtwarningt bind_warningtTruet shadowed_nexttFalse(tselfttreetfilenametn((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pyR    $s  cCs|s t‚|jdƒ}|jdƒ}|jdƒ}|r»|jrg|jtdd|jƒƒq‹g|D]}|jƒ^qn}d|d_|jttdd|jƒ|ƒƒnÐ|rætdd|jƒ}|j|ƒn¥|rct|ƒrM|d    }d
j    g|D]}t
|ƒ^qƒj ƒd krI|j |t ƒndS|jtdƒƒn(d |kr‹|j |t ƒt|_ndS( Ntbasetattrtnameu__next__tprefixuiunexttheadtu __builtin__tglobal(tAssertionErrortgetR treplaceRRtcloneRtis_assign_targettjointstrtstripR
R R (RtnodetresultsRRRRR((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pyt    transform.s.      ( 
4 (t__name__t
__module__R t BM_compatibletPATTERNtorderR    R$(((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pyRs
    
cCs]t|ƒ}|dkrtSx:|jD]/}|jtjkrBtSt||ƒr&tSq&WtS(N(    t find_assigntNoneRtchildrenttypeRtEQUALt
is_subtreeR (R"tassigntchild((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pyRQs  cCsH|jtjkr|S|jtjks7|jdkr;dSt|jƒS(N(R-tsymst    expr_stmtt simple_stmttparentR+R*(R"((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pyR*]s
!cs-|ˆkrtSt‡fd†|jDƒƒS(Nc3s|]}t|ˆƒVqdS(N(R/(t.0tc(R"(s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pys    <genexpr>gs(R tanyR,(trootR"((R"s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pyR/ds N(t__doc__tpgen2RtpygramRR2RRt
fixer_utilRRRR tBaseFixRRR*R/(((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib2to3/fixes/fix_next.pyt<module>s@