You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defget_annotation_str(annotation):
""" Helper function to return the correct string representation of a type annotation. Args: annotation (ast.expr): The AST node representing the type annotation. Returns: str: The string representation of the type annotation. """ifannotationisNone:
return""elifisinstance(annotation, ast.Name):
returnannotation.idelifisinstance(annotation, ast.Subscript):
value=get_annotation_str(annotation.value)
slice=get_annotation_str(annotation.slice)
returnf"{value}[{slice}]"elifisinstance(annotation, ast.Index):
returnget_annotation_str(annotation.value)
elifisinstance(annotation, ast.Tuple):
elements=", ".join(get_annotation_str(e) foreinannotation.elts)
returnf"({elements})"else:
return"?"
But it should be:
symbex/symbex/lib.py
Lines 8 to 10 in 46f8a6d
The text was updated successfully, but these errors were encountered: