@@ -29,16 +29,16 @@ if sys.version_info >= (3, 8):
29
29
class TypeIgnore (type_ignore ):
30
30
tag : str
31
31
class FunctionType (mod ):
32
- argtypes : typing . List [expr ]
32
+ argtypes : list [expr ]
33
33
returns : expr
34
34
35
35
class Module (mod ):
36
- body : typing . List [stmt ]
36
+ body : list [stmt ]
37
37
if sys .version_info >= (3 , 8 ):
38
- type_ignores : typing . List [TypeIgnore ]
38
+ type_ignores : list [TypeIgnore ]
39
39
40
40
class Interactive (mod ):
41
- body : typing . List [stmt ]
41
+ body : list [stmt ]
42
42
43
43
class Expression (mod ):
44
44
body : expr
@@ -48,32 +48,32 @@ class stmt(AST): ...
48
48
class FunctionDef (stmt ):
49
49
name : _identifier
50
50
args : arguments
51
- body : typing . List [stmt ]
52
- decorator_list : typing . List [expr ]
51
+ body : list [stmt ]
52
+ decorator_list : list [expr ]
53
53
returns : expr | None
54
54
55
55
class AsyncFunctionDef (stmt ):
56
56
name : _identifier
57
57
args : arguments
58
- body : typing . List [stmt ]
59
- decorator_list : typing . List [expr ]
58
+ body : list [stmt ]
59
+ decorator_list : list [expr ]
60
60
returns : expr | None
61
61
62
62
class ClassDef (stmt ):
63
63
name : _identifier
64
- bases : typing . List [expr ]
65
- keywords : typing . List [keyword ]
66
- body : typing . List [stmt ]
67
- decorator_list : typing . List [expr ]
64
+ bases : list [expr ]
65
+ keywords : list [keyword ]
66
+ body : list [stmt ]
67
+ decorator_list : list [expr ]
68
68
69
69
class Return (stmt ):
70
70
value : expr | None
71
71
72
72
class Delete (stmt ):
73
- targets : typing . List [expr ]
73
+ targets : list [expr ]
74
74
75
75
class Assign (stmt ):
76
- targets : typing . List [expr ]
76
+ targets : list [expr ]
77
77
value : expr
78
78
79
79
class AugAssign (stmt ):
@@ -90,60 +90,60 @@ class AnnAssign(stmt):
90
90
class For (stmt ):
91
91
target : expr
92
92
iter : expr
93
- body : typing . List [stmt ]
94
- orelse : typing . List [stmt ]
93
+ body : list [stmt ]
94
+ orelse : list [stmt ]
95
95
96
96
class AsyncFor (stmt ):
97
97
target : expr
98
98
iter : expr
99
- body : typing . List [stmt ]
100
- orelse : typing . List [stmt ]
99
+ body : list [stmt ]
100
+ orelse : list [stmt ]
101
101
102
102
class While (stmt ):
103
103
test : expr
104
- body : typing . List [stmt ]
105
- orelse : typing . List [stmt ]
104
+ body : list [stmt ]
105
+ orelse : list [stmt ]
106
106
107
107
class If (stmt ):
108
108
test : expr
109
- body : typing . List [stmt ]
110
- orelse : typing . List [stmt ]
109
+ body : list [stmt ]
110
+ orelse : list [stmt ]
111
111
112
112
class With (stmt ):
113
- items : typing . List [withitem ]
114
- body : typing . List [stmt ]
113
+ items : list [withitem ]
114
+ body : list [stmt ]
115
115
116
116
class AsyncWith (stmt ):
117
- items : typing . List [withitem ]
118
- body : typing . List [stmt ]
117
+ items : list [withitem ]
118
+ body : list [stmt ]
119
119
120
120
class Raise (stmt ):
121
121
exc : expr | None
122
122
cause : expr | None
123
123
124
124
class Try (stmt ):
125
- body : typing . List [stmt ]
126
- handlers : typing . List [ExceptHandler ]
127
- orelse : typing . List [stmt ]
128
- finalbody : typing . List [stmt ]
125
+ body : list [stmt ]
126
+ handlers : list [ExceptHandler ]
127
+ orelse : list [stmt ]
128
+ finalbody : list [stmt ]
129
129
130
130
class Assert (stmt ):
131
131
test : expr
132
132
msg : expr | None
133
133
134
134
class Import (stmt ):
135
- names : typing . List [alias ]
135
+ names : list [alias ]
136
136
137
137
class ImportFrom (stmt ):
138
138
module : _identifier | None
139
- names : typing . List [alias ]
139
+ names : list [alias ]
140
140
level : int
141
141
142
142
class Global (stmt ):
143
- names : typing . List [_identifier ]
143
+ names : list [_identifier ]
144
144
145
145
class Nonlocal (stmt ):
146
- names : typing . List [_identifier ]
146
+ names : list [_identifier ]
147
147
148
148
class Expr (stmt ):
149
149
value : expr
@@ -155,7 +155,7 @@ class expr(AST): ...
155
155
156
156
class BoolOp (expr ):
157
157
op : boolop
158
- values : typing . List [expr ]
158
+ values : list [expr ]
159
159
160
160
class BinOp (expr ):
161
161
left : expr
@@ -176,28 +176,28 @@ class IfExp(expr):
176
176
orelse : expr
177
177
178
178
class Dict (expr ):
179
- keys : typing . List [expr | None ]
180
- values : typing . List [expr ]
179
+ keys : list [expr | None ]
180
+ values : list [expr ]
181
181
182
182
class Set (expr ):
183
- elts : typing . List [expr ]
183
+ elts : list [expr ]
184
184
185
185
class ListComp (expr ):
186
186
elt : expr
187
- generators : typing . List [comprehension ]
187
+ generators : list [comprehension ]
188
188
189
189
class SetComp (expr ):
190
190
elt : expr
191
- generators : typing . List [comprehension ]
191
+ generators : list [comprehension ]
192
192
193
193
class DictComp (expr ):
194
194
key : expr
195
195
value : expr
196
- generators : typing . List [comprehension ]
196
+ generators : list [comprehension ]
197
197
198
198
class GeneratorExp (expr ):
199
199
elt : expr
200
- generators : typing . List [comprehension ]
200
+ generators : list [comprehension ]
201
201
202
202
class Await (expr ):
203
203
value : expr
@@ -210,21 +210,21 @@ class YieldFrom(expr):
210
210
211
211
class Compare (expr ):
212
212
left : expr
213
- ops : typing . List [cmpop ]
214
- comparators : typing . List [expr ]
213
+ ops : list [cmpop ]
214
+ comparators : list [expr ]
215
215
216
216
class Call (expr ):
217
217
func : expr
218
- args : typing . List [expr ]
219
- keywords : typing . List [keyword ]
218
+ args : list [expr ]
219
+ keywords : list [keyword ]
220
220
221
221
class FormattedValue (expr ):
222
222
value : expr
223
223
conversion : int | None
224
224
format_spec : expr | None
225
225
226
226
class JoinedStr (expr ):
227
- values : typing . List [expr ]
227
+ values : list [expr ]
228
228
229
229
if sys .version_info < (3 , 8 ):
230
230
class Num (expr ): # Deprecated in 3.8; use Constant
@@ -267,7 +267,7 @@ class Slice(_SliceT):
267
267
268
268
if sys .version_info < (3 , 9 ):
269
269
class ExtSlice (slice ):
270
- dims : typing . List [slice ]
270
+ dims : list [slice ]
271
271
class Index (slice ):
272
272
value : expr
273
273
@@ -285,11 +285,11 @@ class Name(expr):
285
285
ctx : expr_context
286
286
287
287
class List (expr ):
288
- elts : typing . List [expr ]
288
+ elts : list [expr ]
289
289
ctx : expr_context
290
290
291
291
class Tuple (expr ):
292
- elts : typing . List [expr ]
292
+ elts : list [expr ]
293
293
ctx : expr_context
294
294
295
295
class expr_context (AST ): ...
@@ -299,7 +299,7 @@ if sys.version_info < (3, 9):
299
299
class AugStore (expr_context ): ...
300
300
class Param (expr_context ): ...
301
301
class Suite (mod ):
302
- body : typing . List [stmt ]
302
+ body : list [stmt ]
303
303
304
304
class Del (expr_context ): ...
305
305
class Load (expr_context ): ...
@@ -341,25 +341,25 @@ class NotIn(cmpop): ...
341
341
class comprehension (AST ):
342
342
target : expr
343
343
iter : expr
344
- ifs : typing . List [expr ]
344
+ ifs : list [expr ]
345
345
is_async : int
346
346
347
347
class excepthandler (AST ): ...
348
348
349
349
class ExceptHandler (excepthandler ):
350
350
type : expr | None
351
351
name : _identifier | None
352
- body : typing . List [stmt ]
352
+ body : list [stmt ]
353
353
354
354
class arguments (AST ):
355
355
if sys .version_info >= (3 , 8 ):
356
- posonlyargs : typing . List [arg ]
357
- args : typing . List [arg ]
356
+ posonlyargs : list [arg ]
357
+ args : list [arg ]
358
358
vararg : arg | None
359
- kwonlyargs : typing . List [arg ]
360
- kw_defaults : typing . List [expr | None ]
359
+ kwonlyargs : list [arg ]
360
+ kw_defaults : list [expr | None ]
361
361
kwarg : arg | None
362
- defaults : typing . List [expr ]
362
+ defaults : list [expr ]
363
363
364
364
class arg (AST ):
365
365
arg : _identifier
@@ -380,33 +380,33 @@ class withitem(AST):
380
380
if sys .version_info >= (3 , 10 ):
381
381
class Match (stmt ):
382
382
subject : expr
383
- cases : typing . List [match_case ]
383
+ cases : list [match_case ]
384
384
class pattern (AST ): ...
385
385
# Without the alias, Pyright complains variables named pattern are recursively defined
386
386
_pattern = pattern
387
387
class match_case (AST ):
388
388
pattern : _pattern
389
389
guard : expr | None
390
- body : typing . List [stmt ]
390
+ body : list [stmt ]
391
391
class MatchValue (pattern ):
392
392
value : expr
393
393
class MatchSingleton (pattern ):
394
394
value : Literal [True , False , None ]
395
395
class MatchSequence (pattern ):
396
- patterns : typing . List [pattern ]
396
+ patterns : list [pattern ]
397
397
class MatchStar (pattern ):
398
398
name : _identifier | None
399
399
class MatchMapping (pattern ):
400
- keys : typing . List [expr ]
401
- patterns : typing . List [pattern ]
400
+ keys : list [expr ]
401
+ patterns : list [pattern ]
402
402
rest : _identifier | None
403
403
class MatchClass (pattern ):
404
404
cls : expr
405
- patterns : typing . List [pattern ]
406
- kwd_attrs : typing . List [_identifier ]
407
- kwd_patterns : typing . List [pattern ]
405
+ patterns : list [pattern ]
406
+ kwd_attrs : list [_identifier ]
407
+ kwd_patterns : list [pattern ]
408
408
class MatchAs (pattern ):
409
409
pattern : _pattern | None
410
410
name : _identifier | None
411
411
class MatchOr (pattern ):
412
- patterns : typing . List [pattern ]
412
+ patterns : list [pattern ]
0 commit comments