Fix return type of ast.NodeTransformer.generic_visit (#2486)

This commit is contained in:
Hannes Karppila
2018-10-19 09:50:50 +03:00
committed by Sebastian Rittau
parent d43d8a2884
commit 4d86092df0

View File

@@ -1,16 +1,16 @@
# Python 3.5 ast
import typing
from typing import Any, Union, Iterator
from typing import Any, Union, Iterator, Optional
from _ast import *
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]: ...
def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ...) -> Module: ...
def copy_location(new_node: AST, old_node: AST) -> AST: ...