FunctionSymbol¶
- class FunctionSymbol(name: str, lineno: int, live_func: Any | None = None, ast_info: FunctionInfo | None = None, is_async: bool = False)[source]¶
Bases:
StubSymbolA top-level function definition, combining runtime callable + AST info.
- Parameters:
live_func (callable or None) – The runtime function object.
Nonein AST-only mode.ast_info (FunctionInfo or None) – Metadata from
ASTHarvester.is_async (bool) – Derived from ast_info when available; defaults to
False.
Examples
>>> sym = FunctionSymbol(name="greet", lineno=3, is_async=True) >>> sym.kind <SymbolKind.FUNCTION: 'function'> >>> sym.is_async True
- __init__(name: str, lineno: int, live_func: Any | None = None, ast_info: FunctionInfo | None = None, is_async: bool = False) None[source]¶
- ast_info: FunctionInfo | None = None¶
See also
Public API reference — overview of all public names.