module documentation
Type inference constraint solving
Function | solve |
Solve type constraints. |
def solve_constraints(vars:
list[ TypeVarId]
, constraints: list[ Constraint]
, strict: bool
= True) -> list[ Type|None]
:
(source)
¶
Solve type constraints. Return the best type(s) for type variables; each type can be None if the value of the variable could not be solved. If a variable has no constraints, if strict=True then arbitrarily pick NoneType as the value of the type variable. If strict=False, pick AnyType.