class documentation

class PartialType(ProperType): (source)

View In Hierarchy

Type such as List[?] where type arguments are unknown, or partial None type. These are used for inferring types in multiphase initialization such as this: x = [] # x gets a partial type List[?], as item type is unknown x.append(1) # partial type gets replaced with normal type List[int] Or with None: x = None # x gets a partial type None if c: x = 1 # Infer actual type int for x

Method __init__ Undocumented
Method accept Undocumented
Class Variable __slots__ Undocumented
Instance Variable type Undocumented
Instance Variable value_type Undocumented
Instance Variable var Undocumented

Inherited from Type (via ProperType):

Class Method deserialize Undocumented
Method __repr__ Undocumented
Method can_be_false.setter Undocumented
Method can_be_false_default Undocumented
Method can_be_true.setter Undocumented
Method can_be_true_default Undocumented
Method is_singleton_type Undocumented
Method serialize Undocumented
Property can_be_false Undocumented
Property can_be_true Undocumented
Instance Variable _can_be_false Undocumented
Instance Variable _can_be_true Undocumented

Inherited from Context (via ProperType, Type):

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_column Undocumented
Instance Variable end_line Undocumented
Instance Variable line Undocumented
def __init__(self, type: mypy.nodes.TypeInfo|None, var: mypy.nodes.Var, value_type: Instance|None = None): (source)

Undocumented

def accept(self, visitor: TypeVisitor[T]) -> T: (source)

Undocumented

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

Undocumented

Undocumented

value_type = (source)

Undocumented

Undocumented