class documentation

class TypeVarExpr(TypeVarLikeExpr): (source)

View In Hierarchy

Type variable expression TypeVar(...).

This is also used to represent type variables in symbol tables.

A type variable is not valid as a type unless bound in a TypeVarLikeScope. That happens within:

  1. a generic class that uses the type variable as a type argument or
  2. a generic function that refers to the type variable in its signature.
Class Method deserialize Undocumented
Method __init__ Undocumented
Method accept Undocumented
Method serialize Undocumented
Class Variable __slots__ Undocumented
Instance Variable values Undocumented

Inherited from TypeVarLikeExpr:

Instance Variable upper​_bound Undocumented
Instance Variable variance Undocumented
Property fullname Undocumented
Property name Undocumented
Instance Variable _fullname Undocumented
Instance Variable _name Undocumented

Inherited from Node (via TypeVarLikeExpr, SymbolNode):

Method __str__ Undocumented

Inherited from Context (via TypeVarLikeExpr, SymbolNode, Node):

Method get​_column Don't use. Use x.column.
Method get​_line Don't use. Use x.line.
Method set​_line If target is a node, pull line (and column) information into this node. If column is specified, this will override any column information coming from a node.
Instance Variable column Undocumented
Instance Variable end​_line Undocumented
Instance Variable line Undocumented

Inherited from Node (via TypeVarLikeExpr, Expression):

Method __str__ Undocumented

Inherited from Context (via TypeVarLikeExpr, Expression, Node):

Method get​_column Don't use. Use x.column.
Method get​_line Don't use. Use x.line.
Method set​_line If target is a node, pull line (and column) information into this node. If column is specified, this will override any column information coming from a node.
Instance Variable column Undocumented
Instance Variable end​_line Undocumented
Instance Variable line Undocumented
@classmethod
def deserialize(cls, data): (source)

Undocumented

Parameters
data:JsonDictUndocumented
Returns
TypeVarExprUndocumented
def __init__(self, name, fullname, values, upper_bound, variance=INVARIANT): (source)

Undocumented

Parameters
name:strUndocumented
fullname:strUndocumented
values:List[mypy.types.Type]Undocumented
upper​_bound:mypy.types.TypeUndocumented
variance:intUndocumented
def accept(self, visitor): (source)

Undocumented

Parameters
visitor:ExpressionVisitor[T]Undocumented
Returns
TUndocumented
def serialize(self): (source)

Undocumented

Returns
JsonDictUndocumented
__slots__: tuple[str, ...] = (source)

Undocumented

values = (source)

Undocumented