module documentation

Undocumented

Class InspectionEngine Engine for locating and statically inspecting expressions.
Class SearchAllVisitor Visitor looking for all expressions whose spans enclose given position.
Class SearchVisitor Visitor looking for an expression whose span matches given one exactly.
Function expr_span Format expression span as in mypy error messages.
Function find_all_by_location Find all expressions enclosing given position starting from innermost.
Function find_by_location Find an expression matching given span, or None if not found.
Function find_module_by_fullname Find module by a node fullname.
Function find_node Find the node defining member 'name' in given TypeInfo.
Function get_instance_fallback Returns the Instance fallback for this type if one exists or None.
Function node_ends_before Undocumented
Function node_starts_after Undocumented
def expr_span(expr: Expression) -> str: (source)

Format expression span as in mypy error messages.

def find_all_by_location(tree: MypyFile, line: int, column: int) -> list[Expression]: (source)

Find all expressions enclosing given position starting from innermost.

def find_by_location(tree: MypyFile, line: int, column: int, end_line: int, end_column: int) -> Expression|None: (source)

Find an expression matching given span, or None if not found.

def find_module_by_fullname(fullname: str, modules: dict[str, State]) -> State|None: (source)

Find module by a node fullname. This logic mimics the one we use in fixup, so should be good enough.

def find_node(name: str, info: TypeInfo) -> (Var|FuncBase)|None: (source)

Find the node defining member 'name' in given TypeInfo.

def get_instance_fallback(typ: ProperType) -> list[Instance]: (source)

Returns the Instance fallback for this type if one exists or None.

def node_ends_before(o: Node, line: int, column: int) -> bool: (source)

Undocumented

def node_starts_after(o: Node, line: int, column: int) -> bool: (source)

Undocumented