diff --git a/stdlib/3/ast.pyi b/stdlib/3/ast.pyi index 7efd2b226..6192dde00 100644 --- a/stdlib/3/ast.pyi +++ b/stdlib/3/ast.pyi @@ -144,7 +144,7 @@ class NodeVisitor: def visit_Ellipsis(self, node: Ellipsis) -> Any: ... class NodeTransformer(NodeVisitor): - def generic_visit(self, node: AST) -> Optional[AST]: ... + def generic_visit(self, node: AST) -> AST: ... # TODO: Override the visit_* methods with better return types. # The usual return type is Optional[AST], but Iterable[AST] # is also allowed in some cases -- this needs to be mapped.