ast.pyi: Fix return type of generic_visit() (#2667)

Fixes #2085
This commit is contained in:
Utkarsh Gupta
2018-12-04 12:32:39 +05:30
committed by Sebastian Rittau
parent 1254b30f94
commit 3e4737c683

View File

@@ -1,7 +1,7 @@
# Python 2.7 ast
import typing
from typing import Any, Iterator, Union
from typing import Any, Iterator, Optional, Union
from _ast import *
from _ast import AST, Module
@@ -23,7 +23,7 @@ def walk(node: AST) -> Iterator[AST]: ...
class NodeVisitor():
def visit(self, node: AST) -> Any: ...
def generic_visit(self, node: AST) -> None: ...
def generic_visit(self, node: AST) -> Any: ...
class NodeTransformer(NodeVisitor):
def generic_visit(self, node: AST) -> None: ...
def generic_visit(self, node: AST) -> Optional[AST]: ...