class documentation

class ParamSpecType(TypeVarLikeType): (source)

View In Hierarchy

Type that refers to a ParamSpec.

A ParamSpec is a type variable that represents the parameter types, names and kinds of a callable (i.e., the signature without the return type).

This can be one of these forms
  • P (ParamSpecFlavor.BARE)
  • P.args (ParamSpecFlavor.ARGS)
  • P.kwargs (ParamSpecFLavor.KWARGS)

The upper_bound is really used as a fallback type -- it's shared with TypeVarType for simplicity. It can't be specified by the user and the value is directly derived from the flavor (currently always just 'object').

Class Method deserialize Undocumented
Static Method new​_unification​_variable Undocumented
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ Undocumented
Method accept Undocumented
Method name​_with​_suffix Undocumented
Method serialize Undocumented
Method with​_flavor Undocumented
Class Variable __slots__ Undocumented
Instance Variable flavor Undocumented

Inherited from TypeVarLikeType:

Instance Variable fullname Undocumented
Instance Variable id Undocumented
Instance Variable name Undocumented
Instance Variable upper​_bound Undocumented

Inherited from Type (via TypeVarLikeType, ProperType):

Method __repr__ Undocumented
Method can​_be​_false​_default Undocumented
Method can​_be​_true​_default Undocumented
Instance Variable can​_be​_false Undocumented
Instance Variable can​_be​_true Undocumented

Inherited from Context (via TypeVarLikeType, ProperType, Type):

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
ParamSpecTypeUndocumented
@staticmethod
def new_unification_variable(old): (source)

Undocumented

Parameters
old:ParamSpecTypeUndocumented
Returns
ParamSpecTypeUndocumented
def __eq__(self, other): (source)

Undocumented

Parameters
other:objectUndocumented
Returns
boolUndocumented
def __hash__(self): (source)

Undocumented

Returns
intUndocumented
def __init__(self, name, fullname, id, flavor, upper_bound, *, line=-1, column=-1): (source)

Undocumented

Parameters
name:strUndocumented
fullname:strUndocumented
id:Union[TypeVarId, int]Undocumented
flavor:intUndocumented
upper​_bound:TypeUndocumented
line:intUndocumented
column:intUndocumented
def accept(self, visitor): (source)

Undocumented

Parameters
visitor:TypeVisitor[T]Undocumented
Returns
TUndocumented
def name_with_suffix(self): (source)

Undocumented

Returns
strUndocumented
def serialize(self): (source)

Undocumented

Returns
JsonDictUndocumented
def with_flavor(self, flavor): (source)

Undocumented

Parameters
flavor:intUndocumented
Returns
ParamSpecTypeUndocumented
__slots__: tuple[str, ...] = (source)

Undocumented

flavor = (source)

Undocumented