class documentation
class _ToTypeVisitor(Visitor): (source)
Known subclasses: pytype.pytd.visitors.LookupBuiltins
, pytype.pytd.visitors.LookupExternalTypes
, pytype.pytd.visitors.LookupLocalTypes
Visitor for calling pytd.ToType(). pytd.ToType() usually rejects constants and functions, as they cannot be converted to types. However, aliases can point to them, and typing.Literal can be parameterized by constants, so this visitor tracks whether we are inside an alias or literal, and its to_type() method calls pytd.ToType() with the appropriate allow_constants and allow_functions values.
Method | __init__ |
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Method | to |
Undocumented |
Instance Variable | allow |
Undocumented |
Instance Variable | allow |
Undocumented |
Instance Variable | _in |
Undocumented |
Instance Variable | _in |
Undocumented |
Inherited from Visitor
:
Method |
|
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Class Variable | old |
Undocumented |
Class Variable | unchecked |
Undocumented |
Class Variable | visits |
Undocumented |
Instance Variable | enter |
Undocumented |
Instance Variable | leave |
Undocumented |
Instance Variable | visit |
Undocumented |
Instance Variable | visit |
Undocumented |
Class Variable | _visitor |
Undocumented |
overridden in
pytype.pytd.visitors.LookupBuiltins
, pytype.pytd.visitors.LookupExternalTypes
, pytype.pytd.visitors.LookupLocalTypes
Undocumented