mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
check_new_syntax.py: Fix bug in visit_AnnAssign (#8017)
This commit is contained in:
@@ -44,6 +44,8 @@ def check_new_syntax(tree: ast.AST, path: Path, stub: str) -> list[str]:
|
||||
class OldSyntaxFinder(ast.NodeVisitor):
|
||||
def visit_AnnAssign(self, node: ast.AnnAssign) -> None:
|
||||
AnnotationUnionFinder().visit(node.annotation)
|
||||
if node.value is not None:
|
||||
NonAnnotationUnionFinder().visit(node.value)
|
||||
self.generic_visit(node)
|
||||
|
||||
def visit_arg(self, node: ast.arg) -> None:
|
||||
|
||||
Reference in New Issue
Block a user