class TypeConverter: (source)
Undocumented
Method | __init__ |
Undocumented |
Method | convert_column |
Apply column override if defined; otherwise return column. |
Method | fail |
Undocumented |
Method | invalid_type |
Constructs a type representing some expression that normally forms an invalid type. For example, if we see a type hint that says "3 + 4", we would transform that expression into a RawExpressionType. |
Method | note |
Undocumented |
Method | numeric_type |
Undocumented |
Method | parent |
Return the AST node above the one we are processing |
Method | translate_argument_list |
Undocumented |
Method | translate_expr_list |
Undocumented |
Method | visit |
Modified visit -- keep track of the stack of nodes |
Method | visit_Attribute |
Undocumented |
Method | visit_BinOp |
Undocumented |
Method | visit_Bytes |
Undocumented |
Method | visit_Call |
Undocumented |
Method | visit_Constant |
Undocumented |
Method | visit_Ellipsis |
Undocumented |
Method | visit_Index |
Undocumented |
Method | visit_List |
Undocumented |
Method | visit_Name |
Undocumented |
Method | visit_NameConstant |
Undocumented |
Method | visit_Num |
Undocumented |
Method | visit_raw_str |
Undocumented |
Method | visit_Slice |
Undocumented |
Method | visit_Str |
Undocumented |
Method | visit_Subscript |
Undocumented |
Method | visit_Tuple |
Undocumented |
Method | visit_UnaryOp |
Undocumented |
Instance Variable | assume_str_is_unicode |
Undocumented |
Instance Variable | errors |
Undocumented |
Instance Variable | is_evaluated |
Undocumented |
Instance Variable | line |
Undocumented |
Instance Variable | node_stack |
Undocumented |
Instance Variable | override_column |
Undocumented |
Method | _extract_argument_name |
Undocumented |
Undocumented
Parameters | |
errors:Optional[ | Undocumented |
line:int | Undocumented |
override_column:int | Undocumented |
assume_str_is_unicode:bool | Undocumented |
is_evaluated:bool | Undocumented |
Apply column override if defined; otherwise return column.
Column numbers are sometimes incorrect in the AST and the column override can be used to work around that.
Parameters | |
column:int | Undocumented |
Returns | |
int | Undocumented |
Constructs a type representing some expression that normally forms an invalid type. For example, if we see a type hint that says "3 + 4", we would transform that expression into a RawExpressionType.
The semantic analysis layer will report an "Invalid type" error when it encounters this type, along with the given note if one is provided.
See RawExpressionType's docstring for more details on how it's used.
Parameters | |
node:AST | Undocumented |
note:Optional[ | Undocumented |
Returns | |
RawExpressionType | Undocumented |
Parameters | |
node:Optional[ | Undocumented |
Returns | |
Optional[ | Undocumented |