class documentation

class Type(Protocol): (source)

Known subclasses: libstatic._analyzer.typeinfer.Type

View In Hierarchy

The type of a Python expression.

Property annotation Express this type as a string.
Property args Arguments of a generic type if any.
Property name The name of the type.
Property qualname The full name of the type.

Express this type as a string.

The string might not be a valid Python expression.

For example, str | dict[str, Any] or (int) -> str for callables.

@property
args: Sequence[Type] = (source)

Arguments of a generic type if any.

For example, (str, int) if the type is dict[str, int].

The name of the type.

For example, Iterable or list.

The full name of the type.

For example, typing.Iterable or builtins.list.