class TypeSolver: (source)
Class for solving ~unknowns in type inference results.
Method | __init__ |
Undocumented |
Method | match |
Match the record of a method call against the formal signature. |
Method | match |
Match a partial class (call record) against a complete class. |
Method | match |
Given an ~unknown, match it against a class. |
Method | solve |
Solve the equations generated from the pytd. |
Instance Variable | ast |
Undocumented |
Instance Variable | builtins |
Undocumented |
Instance Variable | protocols |
Undocumented |
Match a partial class (call record) against a complete class. Args: matcher: An instance of pytd.type_match.TypeMatch. solver: An instance of pytd.booleq.Solver. partial: The partial class to match. The class name needs to be prefixed with "~" - the rest of the name is typically the same as complete.name. complete: A complete class to match against. (E.g. a built-in or a user defined class) Returns: An instance of pytd.booleq.BooleanTerm. Raises: FlawedQuery: If this call record is incompatible with the builtin.
Given an ~unknown, match it against a class. Args: matcher: An instance of pytd.type_match.TypeMatch. solver: An instance of pytd.booleq.Solver. unknown: The unknown class to match complete: A complete class to match against. (E.g. a built-in or a user defined class) Returns: An instance of pytd.booleq.BooleanTerm.