TypeAlias

class astroid.nodes.TypeAlias(lineno: int, col_offset: int, parent: NodeNG, *, end_lineno: int, end_col_offset: int)[source]

Bases: AssignTypeNode, Statement

Class representing a ast.TypeAlias node.

>>> import astroid
>>> node = astroid.extract_node('type Point = tuple[float, float]')
>>> node
<TypeAlias l.1 at 0x...>
assigned_stmts(**kwargs: _P.kwargs) → Generator[InferenceResult]
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]
value: NodeNG