ASTSymbols

class ASTSymbols(classes: list[ClassInfo] = <factory>, functions: list[FunctionInfo] = <factory>, variables: list[VariableInfo] = <factory>, typevar_decls: list[TypeVarInfo] = <factory>, all_exports: list[str] | None = None, skip_file: bool = False)[source]

Bases: object

Container for all metadata harvested from a single source file’s AST.

Created by ast_harvest() and consumed by build_symbol_table().

classes

All top-level class definitions, in source order.

Type:

list of ClassInfo

functions

All top-level function definitions, in source order.

Type:

list of FunctionInfo

variables

All top-level annotated (and plain) variable assignments.

Type:

list of VariableInfo

typevar_decls

TypeVar / ParamSpec / TypeVarTuple / TypeAlias / NewType declarations.

Type:

list of TypeVarInfo

all_exports

Contents of __all__, or None when the module has no __all__ declaration.

Type:

list of str or None

classes: list[ClassInfo]
functions: list[FunctionInfo]
variables: list[VariableInfo]
typevar_decls: list[TypeVarInfo]
all_exports: list[str] | None = None
skip_file: bool = False
__init__(classes: list[ClassInfo] = <factory>, functions: list[FunctionInfo] = <factory>, variables: list[VariableInfo] = <factory>, typevar_decls: list[TypeVarInfo] = <factory>, all_exports: list[str] | None = None, skip_file: bool = False) None

See also

Public API reference — overview of all public names.