mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
This reverts commit 39576c5d41.
I merged too soon -- tests are failing.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Python 2.7 ast
|
||||
|
||||
import typing
|
||||
from typing import Any, Iterator, TypeVar, Union
|
||||
from typing import Any, Iterator, Union
|
||||
|
||||
from _ast import *
|
||||
from _ast import AST, Module
|
||||
@@ -9,7 +9,6 @@ from _ast import AST, Module
|
||||
__version__ = ... # type: str
|
||||
PyCF_ONLY_AST = ... # type: int
|
||||
|
||||
_T = TypeVar('_T', bound=AST)
|
||||
|
||||
def parse(source: Union[str, unicode], filename: Union[str, unicode] = ..., mode: Union[str, unicode] = ...) -> Module: ...
|
||||
def copy_location(new_node: AST, old_node: AST) -> AST: ...
|
||||
@@ -27,4 +26,4 @@ class NodeVisitor():
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
class NodeTransformer(NodeVisitor):
|
||||
def generic_visit(self, node: _T) -> _T: ...
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
# Python 3.5 ast
|
||||
|
||||
import typing
|
||||
from typing import Any, Union, TypeVar, Iterator
|
||||
from typing import Any, Union, Iterator
|
||||
|
||||
from _ast import *
|
||||
|
||||
_T = TypeVar('_T', bound=AST)
|
||||
|
||||
class NodeVisitor():
|
||||
def visit(self, node: AST) -> Any: ...
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
class NodeTransformer(NodeVisitor):
|
||||
def generic_visit(self, node: _T) -> _T: ...
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
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