mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 19:01:15 +08:00
add Python 2 stubs for ast, tokenize
This commit is contained in:
28
stdlib/2.7/ast.pyi
Normal file
28
stdlib/2.7/ast.pyi
Normal 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: ...
|
||||
Reference in New Issue
Block a user