class documentation

class TypeVariable(Type): (source)

View In Hierarchy

>>> tv = TypeVariable()
>>> assert isinstance(tv, TypeVariable)
>>> repr(tv)
"Type(name='@TypeVar...', scope='', args=(), meta=...)"
>>> assert tv != TypeVariable()
>>> assert Type('@TypeVar43')==Type('@TypeVar43')
>>> assert hash(Type('@TypeVar43'))==hash(Type('@TypeVar43'))

Method __new__ Undocumented
Class Method _reset Undocumented
Class Variable _id Undocumented

Inherited from Type:

Method __hash__ Undocumented
Method __str__ Undocumented
Method add_args Get a copy of the Type with the given args added in the list of args.
Method add_meta Get a copy of the Type with the given meta informations updated.
Method get_meta Undocumented
Method merge Get a union of the two given types.
Method supertype_of Undocumented
Class Variable Any Undocumented
Class Variable Callable Undocumented
Class Variable Literal Undocumented
Class Variable ModuleType Undocumented
Class Variable Optional Undocumented
Class Variable overload Undocumented
Class Variable TypeType Undocumented
Class Variable Union Undocumented
Instance Variable __dict__ Undocumented
Instance Variable args Arguments of a generic type if any.
Instance Variable meta Stores meta information when the type annotations are not expressive enougth. Used for intermediate inference steps.
Instance Variable name The name of the type.
Instance Variable scope The scope where the type is defined. This is often a module, but it migth be a class or a function in some cases.
Property annotation Represent the type as a string suitable for type annotations.
Property definition Undocumented
Property is_callable Undocumented
Property is_literal A literal type means it's literal values can be recovered with:
Property is_module Undocumented
Property is_none Undocumented
Property is_optional Undocumented
Property is_overload No summary
Property is_protocol Undocumented
Property is_type Undocumented
Property is_typevar Undocumented
Property is_union Undocumented
Property location Undocumented
Property long_annotation Like annotation but returns the type with qualified names.
Property qualname The full name of the type.
Property supertype Undocumented
Property unknown Undocumented
Method _replace Undocumented
def __new__(cls) -> Type: (source)

Undocumented

@classmethod
def _reset(cls): (source)

Undocumented

Undocumented