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:
objectContainer for all metadata harvested from a single source file’s AST.
Created by
ast_harvest()and consumed bybuild_symbol_table().- 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__, orNonewhen the module has no__all__declaration.
- functions: list[FunctionInfo]¶
- variables: list[VariableInfo]¶
- typevar_decls: list[TypeVarInfo]¶
- __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.