/usr/lib64/python3.9/lib2to3/__pycache__
NameSizeModeActions
btm_matcher.cpython-39.opt-1.pyc48770644editdlrm
btm_matcher.cpython-39.opt-2.pyc33060644editdlrm
btm_matcher.cpython-39.pyc48770644editdlrm
btm_utils.cpython-39.opt-1.pyc61480644editdlrm
btm_utils.cpython-39.opt-2.pyc46360644editdlrm
btm_utils.cpython-39.pyc61480644editdlrm
fixer_base.cpython-39.opt-1.pyc62550644editdlrm
fixer_base.cpython-39.opt-2.pyc35040644editdlrm
fixer_base.cpython-39.pyc62550644editdlrm
fixer_util.cpython-39.opt-1.pyc121700644editdlrm
fixer_util.cpython-39.opt-2.pyc100070644editdlrm
fixer_util.cpython-39.pyc121700644editdlrm
main.cpython-39.opt-1.pyc86710644editdlrm
main.cpython-39.opt-2.pyc69180644editdlrm
main.cpython-39.pyc86890644editdlrm
patcomp.cpython-39.opt-1.pyc53890644editdlrm
patcomp.cpython-39.opt-2.pyc48810644editdlrm
patcomp.cpython-39.pyc56050644editdlrm
pygram.cpython-39.opt-1.pyc12620644editdlrm
pygram.cpython-39.opt-2.pyc10570644editdlrm
pygram.cpython-39.pyc12620644editdlrm
pytree.cpython-39.opt-1.pyc236720644editdlrm
pytree.cpython-39.opt-2.pyc149690644editdlrm
pytree.cpython-39.pyc242950644editdlrm
refactor.cpython-39.opt-1.pyc206130644editdlrm
refactor.cpython-39.opt-2.pyc165670644editdlrm
refactor.cpython-39.pyc206430644editdlrm
__init__.cpython-39.opt-1.pyc3020644editdlrm
__init__.cpython-39.opt-2.pyc3020644editdlrm
__init__.cpython-39.pyc3020644editdlrm
__main__.cpython-39.opt-1.pyc2150644editdlrm
__main__.cpython-39.opt-2.pyc2150644editdlrm
__main__.cpython-39.pyc2150644editdlrm
Edit: /usr/lib64/python3.9/lib2to3/__pycache__/btm_matcher.cpython-39.opt-2.pyc (3306B)
a i@shdZddlZddlZddlmZddlmZddlmZGddde Z Gd d d e Z ia d d Z dS) z+George Boutsioukis N) defaultdict)pytree) reduce_treec@seZdZeZddZdS)BMNodecCs"i|_g|_ttj|_d|_dS)N)transition_tablefixersnextrcountidcontentselfr+/usr/lib64/python3.9/lib2to3/btm_matcher.py__init__s zBMNode.__init__N)__name__ __module__ __qualname__ itertoolsr rrrrrrsrc@s4eZdZddZddZddZddZd d Zd S) BottomMatchercCs0t|_t|_|jg|_g|_td|_dS)NZRefactoringTool) setmatchrrootZnodesr logging getLoggerloggerrrrrrs  zBottomMatcher.__init__cCsH|j|t|j}|}|j||jd}|D]}|j|q2dS)Nstart)r appendrZ pattern_treeZget_linear_subpatternaddr)rfixerZtreeZlinear match_nodesZ match_noderrr add_fixer%s   zBottomMatcher.add_fixerc Cs|s |gSt|dtr`g}|dD]6}|j||d}|D]}|||dd|q:q$|S|d|jvrt}||j|d<n|j|d}|ddr|j|dd|d}n|g}|SdS)Nrrr) isinstancetupler!extendrr)rpatternrr# alternativeZ end_nodesendZ next_noderrrr!1s"  zBottomMatcher.addc Cs|j}tt}|D]}|}|rd|_|jD]$}t|tjr*|jdkr*d|_qPq*|j dkrb|j}n|j }||j vr|j |}|j D]}|| |qnH|j}|j dur|j jrq||j vr|j |}|j D]}|| |q|j }qq|S)NT;Fr)rrlistZ was_checkedZchildrenr%rZLeafvaluetyperr r parent) rZleavesZcurrent_ac_noderesultsZleafZcurrent_ast_nodechildZ node_tokenr"rrrrunSs8          zBottomMatcher.runcs*tdfdd|jtddS)Nz digraph g{csZ|jD]J}|j|}td|j|jt|t|jf|dkrLt|j|q dS)Nz%d -> %d [label=%s] //%sr)rkeysprintr type_reprstrr r )ZnodeZ subnode_keyZsubnode print_noderrr8s  z*BottomMatcher.print_ac..print_node})r4rrrr7rprint_acs  zBottomMatcher.print_acN)rrrrr$r!r2r:rrrrrs  "8rcCsDts8ddlm}|jD]\}}t|tkr|t|<qt||S)Nr)python_symbols) _type_reprsZpygramr;__dict__itemsr.int setdefault)Ztype_numr;namevalrrrr5s  r5) __author__rr collectionsrrrZ btm_utilsrobjectrrr<r5rrrrs