mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 05:41:11 +08:00
Update typed_ast for version 1.0 (#931)
This commit is contained in:
committed by
Guido van Rossum
parent
a778704b30
commit
52dd4903d1
4
third_party/3/typed_ast/__init__.pyi
vendored
4
third_party/3/typed_ast/__init__.pyi
vendored
@@ -1,2 +1,2 @@
|
||||
# This module is a fork of the CPython 2.7 and 3.5 ast modules with PEP 484 support.
|
||||
# See: https://github.com/dropbox/typed_ast
|
||||
# This module is a fork of the CPython 2 and 3 ast modules with PEP 484 support.
|
||||
# See: https://github.com/python/typed_ast
|
||||
|
||||
@@ -8,7 +8,10 @@ class NodeVisitor():
|
||||
class NodeTransformer(NodeVisitor):
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ...) -> AST: ...
|
||||
def parse(source: Union[str, bytes],
|
||||
filename: Union[str, bytes] = ...,
|
||||
mode: str = ...,
|
||||
feature_version: int = ...) -> AST: ...
|
||||
def copy_location(new_node: AST, old_node: AST) -> AST: ...
|
||||
def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ...
|
||||
def fix_missing_locations(node: AST) -> AST: ...
|
||||
@@ -86,15 +89,20 @@ class Delete(stmt):
|
||||
|
||||
class Assign(stmt):
|
||||
targets = ... # type: typing.List[expr]
|
||||
value = ... # type: Optional[expr]
|
||||
value = ... # type: expr
|
||||
type_comment = ... # type: Optional[str]
|
||||
annotation = ... # type: Optional[expr]
|
||||
|
||||
class AugAssign(stmt):
|
||||
target = ... # type: expr
|
||||
op = ... # type: operator
|
||||
value = ... # type: expr
|
||||
|
||||
class AnnAssign(stmt):
|
||||
target = ... # type: expr
|
||||
annotation = ... # type: expr
|
||||
value = ... # type: Optional[expr]
|
||||
simple = ... # type: int
|
||||
|
||||
class For(stmt):
|
||||
target = ... # type: expr
|
||||
iter = ... # type: expr
|
||||
@@ -107,6 +115,7 @@ class AsyncFor(stmt):
|
||||
iter = ... # type: expr
|
||||
body = ... # type: typing.List[stmt]
|
||||
orelse = ... # type: typing.List[stmt]
|
||||
type_comment = ... # type: Optional[str]
|
||||
|
||||
class While(stmt):
|
||||
test = ... # type: expr
|
||||
@@ -126,6 +135,7 @@ class With(stmt):
|
||||
class AsyncWith(stmt):
|
||||
items = ... # type: typing.List[withitem]
|
||||
body = ... # type: typing.List[stmt]
|
||||
type_comment = ... # type: Optional[str]
|
||||
|
||||
class Raise(stmt):
|
||||
exc = ... # type: Optional[expr]
|
||||
@@ -255,6 +265,14 @@ class Num(expr):
|
||||
class Str(expr):
|
||||
s = ... # type: str
|
||||
|
||||
class FormattedValue(expr):
|
||||
value = ... # type: expr
|
||||
conversion = ... # type: typing.Optional[int]
|
||||
format_spec = ... # type: typing.Optional[expr]
|
||||
|
||||
class JoinedStr(expr):
|
||||
values = ... # type: typing.List[expr]
|
||||
|
||||
class Bytes(expr):
|
||||
s = ... # type: bytes
|
||||
|
||||
@@ -351,6 +369,7 @@ class comprehension(AST):
|
||||
target = ... # type: expr
|
||||
iter = ... # type: expr
|
||||
ifs = ... # type: typing.List[expr]
|
||||
is_async = ... # type: int
|
||||
|
||||
|
||||
class ExceptHandler(AST):
|
||||
@@ -374,6 +393,7 @@ class arg(AST):
|
||||
annotation = ... # type: Optional[expr]
|
||||
lineno = ... # type: int
|
||||
col_offset = ... # type: int
|
||||
type_comment = ... # type: typing.Optional[str]
|
||||
|
||||
class keyword(AST):
|
||||
arg = ... # type: Optional[identifier]
|
||||
4
third_party/3/typed_ast/conversions.pyi
vendored
4
third_party/3/typed_ast/conversions.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from . import ast27
|
||||
from . import ast35
|
||||
from . import ast3
|
||||
|
||||
def py2to3(ast: ast27.AST) -> ast35.AST: ...
|
||||
def py2to3(ast: ast27.AST) -> ast3.AST: ...
|
||||
|
||||
Reference in New Issue
Block a user