From 8d852c3785710f1d99428399aa20f0293f5d658c Mon Sep 17 00:00:00 2001 From: mbarkhau Date: Sat, 9 Jun 2018 19:30:39 +0200 Subject: [PATCH] 3.6+ Updates for ast module (#2208) Added AnnAssign Added comprehension.is_async Fixed typo on FormattedValue.format_spec --- stdlib/3/_ast.pyi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/stdlib/3/_ast.pyi b/stdlib/3/_ast.pyi index a4b386fd9..4b3de95ed 100644 --- a/stdlib/3/_ast.pyi +++ b/stdlib/3/_ast.pyi @@ -75,6 +75,13 @@ class AugAssign(stmt): op = ... # type: operator value = ... # type: expr +if sys.version_info >= (3, 6): + 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 @@ -236,8 +243,8 @@ class Str(expr): if sys.version_info >= (3, 6): class FormattedValue(expr): value = ... # type: expr - conversion = ... # type: typing.Optional[int] - format_spec = ... # type. typing.Optional[expr] + conversion = ... # type: Optional[int] + format_spec = ... # type: Optional[expr] class JoinedStr(expr): values = ... # type: typing.List[expr] @@ -338,6 +345,8 @@ class comprehension(AST): target = ... # type: expr iter = ... # type: expr ifs = ... # type: typing.List[expr] + if sys.version_info >= (3, 6): + is_async = ... # type: int class ExceptHandler(AST):