TypeAlias¶
- class astroid.nodes.TypeAlias(lineno: int, col_offset: int, parent: NodeNG, *, end_lineno: int, end_col_offset: int)[source]¶
Bases:
AssignTypeNode,StatementClass representing a
ast.TypeAliasnode.>>> import astroid >>> node = astroid.extract_node('type Point = tuple[float, float]') >>> node <TypeAlias l.1 at 0x...>
- name: AssignName¶
- postinit(*, name: AssignName, type_params: list[TypeVar | ParamSpec | TypeVarTuple], value: NodeNG) None[source]¶
- pytype() Literal['typing.TypeAliasType'][source]¶
Get the name of the type that this node represents.
- Returns:
The name of the type.
- qname() Literal['typing.TypeAliasType'][source]¶
Get the qualified name of the type that this node represents.
- Returns:
The qualified name of the type.
- type_params: list[TypeVar | ParamSpec | TypeVarTuple]¶