module documentation

Generate cross references from a project.

Class Definition A symbol definition.
Class DefLocation A location of a symbol definition.
Class DocString Store the text and location of a docstring.
Class Env A collection of namespaced symbols.
Class ExprArg Representation of an expression function call argument.
Class Funcall Representation of a function call.
Class FunctionParam A link between a function def and the defs of its params.
Class Indexer Runs the indexer visitor and collects its results.
Class IndexVisitor Visitor that generates indexes.
Class Module Module representation.
Class NameArg Representation of a single-variable function call argument.
Class PytypeValue Stores a value inferred by pytype.
Class Reference A symbol holding a reference to a definition.
Class Remote A symbol from another module.
Class ScopedVisitor An AST node visitor that keeps track of scopes and environments.
Class VmTrace Undocumented
Exception AttrError Undocumented
Exception PytypeError Wrap exceptions raised by the indexer.
Function get_end_location Undocumented
Function get_location Undocumented
Function match_opcodes Get all opcodes matching op_match_list on a given line.
Function match_opcodes_multiline Get all opcodes matching op_match_list in a range of lines.
Function process_file Process a single file and return cross references.
Function qualified_method Fully qualify a method call with its class scope.
Constant DEF_OFFSETS Undocumented
Constant IMPORT_FILE_MARKER Undocumented
Function _unwrap Undocumented
Constant _RETURNING_NAME Undocumented
Type Variable _T Undocumented
def get_end_location(node): (source)

Undocumented

def get_location(node): (source)

Undocumented

def match_opcodes(opcode_traces, lineno, op_match_list): (source)

Get all opcodes matching op_match_list on a given line. Args: opcode_traces: traces lineno: line number to get ops from. op_match_list: [(opcode_name, symbol|None), ...]; None matches any symbol. Returns: A list of matching opcodes.

def match_opcodes_multiline(opcode_traces, start, end, op_match_list): (source)

Get all opcodes matching op_match_list in a range of lines.

def process_file(options, source_text=None, generate_callgraphs=False, preserve_pytype_vm=False): (source)

Process a single file and return cross references. Args: options: A dictionary of pytype options. source_text: Optional text of the file; will be read from the file pointed to by options.input if not supplied. generate_callgraphs: Collect call graph information preserve_pytype_vm: Preserve the pytype vm in the indexer Returns: The Indexer object used for indexing. Raises: PytypeError if pytype fails.

def qualified_method(data): (source)

Fully qualify a method call with its class scope.

DEF_OFFSETS: dict[str, int] = (source)

Undocumented

Value
{'ClassDef': 6, 'FunctionDef': 4}
IMPORT_FILE_MARKER: str = (source)

Undocumented

Value
'<__FILE__>'
def _unwrap(data): (source)

Undocumented

_RETURNING_NAME: str = (source)

Undocumented

Value
'RETURNING NAME'

Undocumented

Value
TypeVar('_T')