class documentation

class _AnnotationStringParser(ast.NodeTransformer): (source)

View In Hierarchy

Implementation of 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
def visit_Constant(self, node: ast.Constant) -> ast.expr: (source)

Undocumented

def visit_Str(self, node: ast.Str) -> ast.expr: (source)

Undocumented

def visit_Subscript(self, node: ast.Subscript) -> ast.Subscript: (source)

Undocumented

def _parse_string(self, value: str) -> ast.expr: (source)

Undocumented