mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Re-export code from _ast into ast. (#1515)
After mypy [started hiding](https://github.com/python/mypy/pull/3706) imported names in stubs unless `from ... import ...` is used, we found an error with stubs of ast module. It looks like ast module should re-export everything in `_ast` and according to PEP 484, it can do that by doing `from _ast import *`, so this is what this PR does.
This commit is contained in:
committed by
Guido van Rossum
parent
a249b40a6d
commit
3f9fafbbb7
@@ -3,19 +3,7 @@
|
||||
import typing
|
||||
from typing import Any, Iterator, Union
|
||||
|
||||
from _ast import (
|
||||
Add, alias, And, arguments, Assert, Assign, AST, Attribute, AugAssign,
|
||||
AugLoad, AugStore, BinOp, BitAnd, BitOr, BitXor, BoolOp, boolop, Break,
|
||||
Call, ClassDef, cmpop, Compare, comprehension, Continue, Del, Delete, Dict,
|
||||
DictComp, Div, Ellipsis, Eq, ExceptHandler, Exec, Expr, expr, Expression,
|
||||
expr_context, ExtSlice, FloorDiv, For, FunctionDef, GeneratorExp, Global,
|
||||
Gt, GtE, If, IfExp, Import, ImportFrom, In, Index, Interactive, Invert, Is,
|
||||
IsNot, keyword, Lambda, List, ListComp, Load, LShift, Lt, LtE, Mod, mod,
|
||||
Module, Mult, Name, Not, NotEq, NotIn, Num, operator, Or, Param, Pass, Pow,
|
||||
Print, Raise, Repr, Return, RShift, Set, SetComp, Slice, slice, stmt,
|
||||
Store, Str, Sub, Subscript, Suite, TryExcept, TryFinally, Tuple, UAdd,
|
||||
UnaryOp, unaryop, USub, While, With, Yield
|
||||
)
|
||||
from _ast import *
|
||||
|
||||
__version__ = ... # type: str
|
||||
PyCF_ONLY_AST = ... # type: int
|
||||
|
||||
Reference in New Issue
Block a user