VariableInfo
-
class VariableInfo(name: str, lineno: int, annotation_str: str | None = None, value_repr: str | None = None)[source]
Bases: object
Metadata for a module-level variable assignment.
Covers both annotated assignments (name: Type = value) and
plain assignments without annotations (name = value).
- Parameters:
name (str)
lineno (int)
annotation_str (str or None) – Unparsed annotation expression, or None for unannotated assignments.
value_repr (str or None) – Unparsed right-hand side expression, or None when absent.
-
name: str
-
lineno: int
-
annotation_str: str | None = None
-
value_repr: str | None = None
-
__init__(name: str, lineno: int, annotation_str: str | None = None, value_repr: str | None = None) → None
See also
Public API reference — overview of all public names.