Files
typeshed/stdlib/2.7/ast.pyi
2016-01-27 19:26:57 -08:00

41 lines
1.8 KiB
Python

# Automatically generated by pytype. May contain errors.
from typing import Any, Tuple, Generator
from _ast import (
AST, alias, arguments, boolop, cmpop, comprehension, excepthandler,
expr, expr_context, keyword, mod, operator, slice, stmt, unaryop, Add,
And, Assert, Assign, Attribute, AugAssign, AugLoad, AugStore, BinOp,
BitAnd, BitOr, BitXor, BoolOp, Break, Call, ClassDef, Compare, Continue,
Del, Delete, Dict, DictComp, Div, Ellipsis, Eq, ExceptHandler, Exec,
Expr, Expression, ExtSlice, FloorDiv, For, FunctionDef, GeneratorExp,
Global, Gt, GtE, If, IfExp, Import, ImportFrom, In, Index, Interactive,
Invert, Is, IsNot, LShift, Lambda, List, ListComp, Load, Lt, LtE, Mod,
Module, Mult, Name, Not, NotEq, NotIn, Num, Or, Param, Pass, Pow, Print,
RShift, Raise, Repr, Return, Set, SetComp, Slice, Store, Str, Sub,
Subscript, Suite, TryExcept, TryFinally, Tuple, UAdd, USub, UnaryOp,
While, With, Yield)
__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) -> AST: ...
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: ...