add Python 2 stubs for ast, tokenize

This commit is contained in:
Matthias Kramm
2015-12-22 12:01:02 -08:00
parent cbb8014508
commit 2bb0d98b6d
2 changed files with 169 additions and 0 deletions

28
stdlib/2.7/ast.pyi Normal file
View File

@@ -0,0 +1,28 @@
# Automatically generated by pytype. May contain errors.
from typing import Any, Tuple, Generator
from _ast import *
__version__ = ... # type: int
PyCF_ONLY_AST = ... # type: int
def copy_location(new_node, old_node) -> Any: ...
def dump(node, *args, **kwargs) -> str: ...
def fix_missing_locations(node) -> Any: ...
def get_docstring(node, *args, **kwargs) -> Any: ...
def increment_lineno(node, *args, **kwargs) -> Any: ...
def iter_child_nodes(node) -> Generator[Any, Any, Any]: ...
def iter_fields(node) -> Any: ... # TODO: Generator[Tuple[Any, ...]]: ...
def literal_eval(node_or_string) -> Any: ...
def parse(source, filename, mode, *args, **kwargs) -> Any: ...
def walk(node) -> Any: ... # TODO: Generator[Any]: ...
class NodeVisitor(object):
__doc__ = ... # type: str
def generic_visit(self, node) -> None: ...
def visit(self, node) -> Any: ...
class NodeTransformer(NodeVisitor):
__doc__ = ... # type: str
def generic_visit(self, node) -> Any: ...