class documentation

class ScopeGraph(ast.NodeVisitor): (source)

Constructor: ScopeGraph()

View In Hierarchy

Undocumented

Method __init__ The central concepts in the framework are declarations, references, and scopes
Method add_reference Undocumented
Method add_scope Undocumented
Method build Undocumented
Method get_parent Undocumented
Method MRO_resolve Undocumented
Method MRO_resolve_method given current class name and method name; using method resolution order to locate which class the method name is defined
Method print_out Undocumented
Method resolve Find the name in given working scope That is, a path with fewer parent transitions is more specific than a path with more parent transitions.
Method test Undocumented
Method test_MRO_resolve Undocumented
Method visit_ClassDef Undocumented
Method visit_FunctionDef Undocumented
Method visit_Global Undocumented
Method visit_Import Undocumented
Method visit_ImportFrom Undocumented
Method visit_Module Undocumented
Method visit_Name Undocumented
Method visit_Nonlocal Undocumented
Instance Variable current_scope_name Undocumented
Instance Variable declarations Undocumented
Instance Variable ig Undocumented
Instance Variable imports Undocumented
Instance Variable MRO_graph Undocumented
Instance Variable parent_relations Undocumented
Instance Variable references Undocumented
Instance Variable sg Undocumented
Method _add_contained Undocumented
Method _add_declared Undocumented
def __init__(self): (source)

The central concepts in the framework are declarations, references, and scopes

def add_reference(self, scope_name, name, ctx): (source)

Undocumented

def add_scope(self, scope_name, parent_name): (source)

Undocumented

def build(self, ast_tree): (source)

Undocumented

def get_parent(self, scope_name): (source)

Undocumented

def MRO_resolve(self, start_name): (source)

Undocumented

def MRO_resolve_method(self, cls_name, method_name): (source)

given current class name and method name; using method resolution order to locate which class the method name is defined

def print_out(self): (source)

Undocumented

def resolve(name, working_scope): (source)

Find the name in given working scope That is, a path with fewer parent transitions is more specific than a path with more parent transitions.

def test(self): (source)

Undocumented

def test_MRO_resolve(self, start_name): (source)

Undocumented

def visit_ClassDef(self, node): (source)

Undocumented

def visit_FunctionDef(self, node): (source)

Undocumented

def visit_Global(self, node): (source)

Undocumented

def visit_Import(self, node): (source)

Undocumented

def visit_ImportFrom(self, node): (source)

Undocumented

def visit_Module(self, node): (source)

Undocumented

def visit_Name(self, node): (source)

Undocumented

def visit_Nonlocal(self, node): (source)

Undocumented

current_scope_name = (source)

Undocumented

declarations: dict = (source)

Undocumented

Undocumented

Undocumented

MRO_graph: dict = (source)

Undocumented

parent_relations: dict = (source)

Undocumented

references: dict = (source)

Undocumented

Undocumented

def _add_contained(self): (source)

Undocumented

def _add_declared(self): (source)

Undocumented