rope.refactor.similarfinder
This module can be used for finding similar code
Exceptions
Errors for performing a refactoring |
Classes
SimilarFinder can be used to find similar pieces of code |
|
A class for finding similar expressions and statements |
|
Functions
|
Module Contents
- exception rope.refactor.similarfinder.BadNameInCheckError
Bases:
rope.base.exceptions.RefactoringErrorErrors for performing a refactoring
- class rope.refactor.similarfinder.SimilarFinder(pymodule, wildcards=None)
SimilarFinder can be used to find similar pieces of code
See the notes in the rope.refactor.restructure module for more info.
- source
- pymodule
- get_matches(code, args=None, start=0, end=None)
- get_match_regions(*args, **kwds)
- class rope.refactor.similarfinder.RawSimilarFinder(source, node=None, does_match=None)
A class for finding similar expressions and statements
- class rope.refactor.similarfinder.Match(mapping)
- mapping
- get_region()
Returns match region
- get_ast(name)
Return the ast node that has matched rope variables
- class rope.refactor.similarfinder.ExpressionMatch(ast, mapping)
Bases:
Match- ast
- get_region()
Returns match region
- mapping
- get_ast(name)
Return the ast node that has matched rope variables
- class rope.refactor.similarfinder.StatementMatch(ast_list, mapping)
Bases:
Match- ast_list
- get_region()
Returns match region
- mapping
- get_ast(name)
Return the ast node that has matched rope variables
- class rope.refactor.similarfinder.CodeTemplate(template)
- template
- get_names()
- substitute(mapping)
- rope.refactor.similarfinder.make_pattern(code, variables)