/opt/alt/python35/lib64/python3.5/lib2to3/__pycache__
NameSizeModeActions
btm_matcher.cpython-35.opt-1.pyc53160644editdlrm
btm_matcher.cpython-35.opt-2.pyc37310644editdlrm
btm_matcher.cpython-35.pyc53160644editdlrm
btm_utils.cpython-35.opt-1.pyc67860644editdlrm
btm_utils.cpython-35.opt-2.pyc52540644editdlrm
btm_utils.cpython-35.pyc67860644editdlrm
fixer_base.cpython-35.opt-1.pyc65030644editdlrm
fixer_base.cpython-35.opt-2.pyc37280644editdlrm
fixer_base.cpython-35.pyc65030644editdlrm
fixer_util.cpython-35.opt-1.pyc133520644editdlrm
fixer_util.cpython-35.opt-2.pyc111740644editdlrm
fixer_util.cpython-35.pyc133520644editdlrm
main.cpython-35.opt-1.pyc91390644editdlrm
main.cpython-35.opt-2.pyc73720644editdlrm
main.cpython-35.pyc91780644editdlrm
patcomp.cpython-35.opt-1.pyc60350644editdlrm
patcomp.cpython-35.opt-2.pyc55150644editdlrm
patcomp.cpython-35.pyc63320644editdlrm
pygram.cpython-35.opt-1.pyc12590644editdlrm
pygram.cpython-35.opt-2.pyc10440644editdlrm
pygram.cpython-35.pyc12590644editdlrm
pytree.cpython-35.opt-1.pyc260050644editdlrm
pytree.cpython-35.opt-2.pyc165910644editdlrm
pytree.cpython-35.pyc268690644editdlrm
refactor.cpython-35.opt-1.pyc227610644editdlrm
refactor.cpython-35.opt-2.pyc187010644editdlrm
refactor.cpython-35.pyc228030644editdlrm
__init__.cpython-35.opt-1.pyc1360644editdlrm
__init__.cpython-35.opt-2.pyc1280644editdlrm
__init__.cpython-35.pyc1360644editdlrm
__main__.cpython-35.opt-1.pyc2330644editdlrm
__main__.cpython-35.opt-2.pyc2250644editdlrm
__main__.cpython-35.pyc2330644editdlrm
Edit: /opt/alt/python35/lib64/python3.5/lib2to3/__pycache__/fixer_base.cpython-35.opt-1.pyc (6503B)
 yÓzf"ã@srdZddlZddlmZddlmZddlmZGdd„deƒZ Gd d „d e ƒZ dS) z2Base class for fixers (optional, but recommended).éNé)ÚPatternCompiler)Úpygram)Údoes_tree_importc@seZdZdZdZdZdZdZdZe j dƒZ e ƒZ dZdZdZdZdZdZejZdd„Zd d „Zd d „Zd d„Zdd„Zddd„Zdd„Zddd„Zdd„Zdd„Z dd„Z!dS)ÚBaseFixaOptional base class for fixers. The subclass name must be FixFooBar where FooBar is the result of removing underscores and capitalizing the words of the fix name. For example, the class name for a fixer named 'has_key' should be FixHasKey. NrZpostFécCs ||_||_|jƒdS)aInitializer. Subclass may override. Args: options: a dict containing the options passed to RefactoringTool that could be used to customize the fixer through the command line. log: a list to append warnings and other messages to. N)ÚoptionsÚlogÚcompile_pattern)Úselfrr ©r ú7/opt/alt/python35/lib64/python3.5/lib2to3/fixer_base.pyÚ__init__/s  zBaseFix.__init__cCs@|jdk r<tƒ}|j|jddƒ\|_|_dS)z–Compiles self.PATTERN into self.pattern. Subclass may override if it doesn't want to use self.{pattern,PATTERN} in .match(). NZ with_treeT)ÚPATTERNrr ÚpatternÚ pattern_tree)r ÚPCr r r r ;s zBaseFix.compile_patterncCs ||_dS)zOSet the filename. The main refactoring tool should call this. N)Úfilename)r rr r r Ú set_filenameFszBaseFix.set_filenamecCs%d|i}|jj||ƒo$|S)aReturns match for a given parse tree node. Should return a true or false object (not necessarily a bool). It may return a non-empty dict of matching sub-nodes as returned by a matching pattern. Subclass may override. Únode)rÚmatch)r rÚresultsr r r rMs z BaseFix.matchcCs tƒ‚dS)a¶Returns the transformation for a given parse tree node. Args: node: the root of the parse tree that matched the fixer. results: a dict mapping symbolic names to part of the match. Returns: None, or a node that is a modified copy of the argument node. The node argument may also be modified in-place to effect the same change. Subclass *must* override. N)ÚNotImplementedError)r rrr r r Ú transformYszBaseFix.transformZxxx_todo_changemecCsI|}x,||jkr4|tt|jƒƒ}q W|jj|ƒ|S)z†Return a string suitable for use as an identifier The new name is guaranteed not to conflict with other identifiers. )Ú used_namesÚstrÚnextÚnumbersÚadd)r ÚtemplateÚnamer r r Únew_nameis zBaseFix.new_namecCs=|jr)d|_|jjd|jƒ|jj|ƒdS)NFz### In file %s ###)Ú first_logr Úappendr)r Úmessager r r Ú log_messagets  zBaseFix.log_messagecCsU|jƒ}|jƒ}d|_d}|j|||fƒ|rQ|j|ƒdS)aWarn the user that a given chunk of code is not valid Python 3, but that it cannot be converted automatically. First argument is the top-level node for the code in question. Optional second argument is why it can't be converted. ÚzLine %d: could not convert: %sN)Ú get_linenoZcloneÚprefixr%)r rÚreasonÚlinenoZ for_outputÚmsgr r r Úcannot_convertzs   zBaseFix.cannot_convertcCs'|jƒ}|jd||fƒdS)zàUsed for warning the user about possible uncertainty in the translation. First argument is the top-level node for the code in question. Optional second argument is why it can't be converted. z Line %d: %sN)r'r%)r rr)r*r r r Úwarning‰s zBaseFix.warningcCs8|j|_|j|ƒtjdƒ|_d|_dS)zîSome fixers need to maintain tree-wide state. This method is called once, at the start of tree fix-up. tree - the root node of the tree to be processed. filename - the name of the file the tree came from. rTN)rrÚ itertoolsÚcountrr")r Útreerr r r Ú start_tree“s  zBaseFix.start_treecCsdS)zóSome fixers need to maintain tree-wide state. This method is called once, at the conclusion of tree fix-up. tree - the root node of the tree to be processed. filename - the name of the file the tree came from. Nr )r r0rr r r Ú finish_treeŸszBaseFix.finish_tree)"Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrr.r/rÚsetrÚorderZexplicitZ run_orderZ _accept_typeZkeep_line_orderZ BM_compatiblerZpython_symbolsZsymsrr rrrr!r%r,r-r1r2r r r r rs4       rcs:eZdZdZdZ‡fdd†Zdd„Z‡S)ÚConditionalFixz@ Base class for fixers which not execute if an import is found. Ncs#tt|ƒj|Œd|_dS)N)Úsuperr9r1Ú _should_skip)r Úargs)Ú __class__r r r1¯szConditionalFix.start_treecCsg|jdk r|jS|jjdƒ}|d}dj|dd…ƒ}t|||ƒ|_|jS)NÚ.réÿÿÿÿr?)r;Úskip_onÚsplitÚjoinr)r rZpkgr r r r Ú should_skip³s zConditionalFix.should_skip)r3r4r5r6r@r1rCr r )r=r r9©s r9) r6r.Zpatcomprr&rZ fixer_utilrÚobjectrr9r r r r Ús  ›