Class | TypeTranslationError |
Exception raised when an expression is not valid as a type. |
Function | expr_to_unanalyzed_type |
Translate an expression to the corresponding type. |
Function | _extract_argument_name |
Undocumented |
Translate an expression to the corresponding type.
The result is not semantically analyzed. It can be UnboundType or TypeList. Raise TypeTranslationError if the expression cannot represent a type.
If allow_new_syntax is True, allow all type syntax independent of the target Python version (used in stubs).
Parameters | |
expr:Expression | Undocumented |
options:Optional[ | Undocumented |
allow_new_syntax:bool | Undocumented |
_parent:Optional[ | Undocumented |
Returns | |
ProperType | Undocumented |