Visitor(s) for walking ASTs.
Class |
|
Visitor for making names fully qualified. |
Class |
|
Visitor for setting the correct type on self. |
Class |
|
Visitor for adjusting type parameters. |
Class |
|
Convert ClassType to LateType. |
Class |
|
Set .cls pointers to 'None'. |
Class |
|
Visitor for retrieving module names from external types. |
Class |
|
Visitor for inserting type parameters into signatures. |
Class |
|
Replace all types not in a symbol table with AnythingType. |
Class |
|
Drops all mutable parameters. |
Class |
|
Expand to Cartesian product of parameter types. |
Class |
|
Visitor for extracting all superclasses (i.e., the class hierarchy). |
Class |
|
Fill in ClassType pointers using symbol tables. |
Class |
|
Convert LateType to (unresolved) ClassType. |
Class |
|
Look up built-in NamedTypes and give them fully-qualified names. |
Class |
|
Look up NamedType pointers using a symbol table. |
Class |
|
Look up local identifiers. Must be called on a TypeDeclUnit. |
Class |
|
Change all NamedType objects to ClassType objects. |
Class |
|
Visitor for removing unwanted methods from classes. |
Class |
|
Visitor for converting ClassTypes called ~unknown* to just AnythingType. |
Class |
|
Replace all references to modules in a list with AnythingType. |
Class |
|
Visitor for replacing type parameters with actual types. |
Class |
|
Visitor for replacing types in a tree. |
Class |
|
Undocumented |
Class |
|
Strips off the prefix the parser uses to mark external types. |
Class |
|
Visitor for verifying containers. |
Class |
|
Visitor for verifying that Literal[object] contains an enum. |
Class |
|
Utility class for testing visitors.LookupClasses. |
Class |
|
Visitor for verifying pytd ASTs. For tests. |
Exception |
|
Undocumented |
Exception |
|
Undocumented |
Exception |
|
Undocumented |
Function |
|
Converts a pytd.Class to an instance of pytd.Type. |
Function |
|
Expand a single signature. |
Function |
|
Converts a PyTD object from one using NamedType to ClassType. |
Function |
|
Substitutes parameters into base_type if the latter has a template. |
Class | _ |
Visitor for counting how often given unknowns occur in a type. |
Class | _ |
Adjusts GenericType nodes to handle base type changes. |
Class | _ |
Visitor for calling pytd.ToType(). |
Function | _ |
Undocumented |
Expand a single signature. For argument lists that contain disjunctions, generates all combinations of arguments. The expansion will be done right to left. E.g., from (a or b, c or d), this will generate the signatures (a, c), (a, d), (b, c), (b, d). (In that order) Arguments: sig: A pytd.Signature instance. Returns: A list. The visit function of the parent of this node (VisitFunction) will process this list further.
Converts a PyTD object from one using NamedType to ClassType. Args: target: The PyTD object to process. If this is a TypeDeclUnit it will also be used for lookups. global_module: Global symbols. Required if target is not a TypeDeclUnit. ignore_late_types: If True, raise an error if we encounter a LateType. Returns: A new PyTD object that only uses ClassType. All ClassType instances will point to concrete classes. Raises: ValueError: If we can't find a class.