mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Fix return type of ast.NodeTransformer.generic_visit (#2486)
This commit is contained in:
committed by
Sebastian Rittau
parent
d43d8a2884
commit
4d86092df0
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user