class _AnnotationStringParser(ast.NodeTransformer):
Implementation of ModuleVistor._unstring_annotation()
.
When given an expression, the node returned by ast.NodeVisitor.visit()
will also be an expression. If any string literal contained in the original expression is either invalid Python or not a singular expression, SyntaxError
is raised.
Method | visit_Constant |
Undocumented |
Method | visit_Str |
Undocumented |
Method | visit_Subscript |
Undocumented |
Method | _parse_string |
Undocumented |
Undocumented
Parameters | |
node:ast.Constant | Undocumented |
Returns | |
ast.expr | Undocumented |
Undocumented
Parameters | |
node:ast.Str | Undocumented |
Returns | |
ast.expr | Undocumented |