module documentation
Solver for type equations.
Class |
|
Class for solving ~unknowns in type inference results. |
Exception |
|
Thrown if there is a fundamental flaw in the query. |
Function | convert |
Convert pytd with unknowns (structural types) to one with nominal types. |
Function | convert |
Convert a string representing a type back to a pytd type. |
Function | convert |
Like convert_string_type, but operate on a list. |
Function | extract |
Extract all classes that are not unknowns of call records of builtins. |
Function | insert |
Replace ~unknown types in a pytd with the actual (solved) types. |
Function | log |
Print a raw type mapping. For debugging. |
Function | solve |
Solve the unknowns in a pytd AST using the standard Python builtins. |
Constant | MAX |
Undocumented |
Variable | log |
Undocumented |
Solve the unknowns in a pytd AST using the standard Python builtins. Args: ast: A pytd.TypeDeclUnit, containing classes named ~unknownXX. builtins_pytd: A pytd for builtins. protocols_pytd: A pytd for protocols. Returns: A tuple of (1) a dictionary (str->str) mapping unknown class names to known class names and (2) a pytd.TypeDeclUnit of the complete classes in ast.