@@ -8,7 +8,10 @@ class NodeVisitor():
8
8
class NodeTransformer (NodeVisitor ):
9
9
def generic_visit (self , node : AST ) -> None : ...
10
10
11
- def parse (source : Union [str , bytes ], filename : Union [str , bytes ] = ..., mode : str = ...) -> AST : ...
11
+ def parse (source : Union [str , bytes ],
12
+ filename : Union [str , bytes ] = ...,
13
+ mode : str = ...,
14
+ feature_version : int = ...) -> AST : ...
12
15
def copy_location (new_node : AST , old_node : AST ) -> AST : ...
13
16
def dump (node : AST , annotate_fields : bool = ..., include_attributes : bool = ...) -> str : ...
14
17
def fix_missing_locations (node : AST ) -> AST : ...
@@ -86,15 +89,20 @@ class Delete(stmt):
86
89
87
90
class Assign (stmt ):
88
91
targets = ... # type: typing.List[expr]
89
- value = ... # type: Optional[ expr]
92
+ value = ... # type: expr
90
93
type_comment = ... # type: Optional[str]
91
- annotation = ... # type: Optional[expr]
92
94
93
95
class AugAssign (stmt ):
94
96
target = ... # type: expr
95
97
op = ... # type: operator
96
98
value = ... # type: expr
97
99
100
+ class AnnAssign (stmt ):
101
+ target = ... # type: expr
102
+ annotation = ... # type: expr
103
+ value = ... # type: Optional[expr]
104
+ simple = ... # type: int
105
+
98
106
class For (stmt ):
99
107
target = ... # type: expr
100
108
iter = ... # type: expr
@@ -107,6 +115,7 @@ class AsyncFor(stmt):
107
115
iter = ... # type: expr
108
116
body = ... # type: typing.List[stmt]
109
117
orelse = ... # type: typing.List[stmt]
118
+ type_comment = ... # type: Optional[str]
110
119
111
120
class While (stmt ):
112
121
test = ... # type: expr
@@ -126,6 +135,7 @@ class With(stmt):
126
135
class AsyncWith (stmt ):
127
136
items = ... # type: typing.List[withitem]
128
137
body = ... # type: typing.List[stmt]
138
+ type_comment = ... # type: Optional[str]
129
139
130
140
class Raise (stmt ):
131
141
exc = ... # type: Optional[expr]
@@ -255,6 +265,14 @@ class Num(expr):
255
265
class Str (expr ):
256
266
s = ... # type: str
257
267
268
+ class FormattedValue (expr ):
269
+ value = ... # type: expr
270
+ conversion = ... # type: typing.Optional[int]
271
+ format_spec = ... # type: typing.Optional[expr]
272
+
273
+ class JoinedStr (expr ):
274
+ values = ... # type: typing.List[expr]
275
+
258
276
class Bytes (expr ):
259
277
s = ... # type: bytes
260
278
@@ -351,6 +369,7 @@ class comprehension(AST):
351
369
target = ... # type: expr
352
370
iter = ... # type: expr
353
371
ifs = ... # type: typing.List[expr]
372
+ is_async = ... # type: int
354
373
355
374
356
375
class ExceptHandler (AST ):
@@ -374,6 +393,7 @@ class arg(AST):
374
393
annotation = ... # type: Optional[expr]
375
394
lineno = ... # type: int
376
395
col_offset = ... # type: int
396
+ type_comment = ... # type: typing.Optional[str]
377
397
378
398
class keyword (AST ):
379
399
arg = ... # type: Optional[identifier]
0 commit comments