@@ -81,8 +81,7 @@ reveal_type(b) # revealed: Literal[2]
81
81
82
82
``` py
83
83
# TODO : Add diagnostic (need more values to unpack)
84
- # TODO : Remove 'not-iterable' diagnostic
85
- [a, * b, c, d] = (1 , 2 ) # error: "Object of type `None` is not iterable"
84
+ [a, * b, c, d] = (1 , 2 )
86
85
reveal_type(a) # revealed: Literal[1]
87
86
# TODO : Should be list[Any] once support for assigning to starred expression is added
88
87
reveal_type(b) # revealed: @Todo
@@ -93,7 +92,7 @@ reveal_type(d) # revealed: Unknown
93
92
### Starred expression (2)
94
93
95
94
``` py
96
- [a, * b, c] = (1 , 2 ) # error: "Object of type `None` is not iterable"
95
+ [a, * b, c] = (1 , 2 )
97
96
reveal_type(a) # revealed: Literal[1]
98
97
# TODO : Should be list[Any] once support for assigning to starred expression is added
99
98
reveal_type(b) # revealed: @Todo
@@ -103,8 +102,7 @@ reveal_type(c) # revealed: Literal[2]
103
102
### Starred expression (3)
104
103
105
104
``` py
106
- # TODO : Remove 'not-iterable' diagnostic
107
- [a, * b, c] = (1 , 2 , 3 ) # error: "Object of type `None` is not iterable"
105
+ [a, * b, c] = (1 , 2 , 3 )
108
106
reveal_type(a) # revealed: Literal[1]
109
107
# TODO : Should be list[int] once support for assigning to starred expression is added
110
108
reveal_type(b) # revealed: @Todo
@@ -114,8 +112,7 @@ reveal_type(c) # revealed: Literal[3]
114
112
### Starred expression (4)
115
113
116
114
``` py
117
- # TODO : Remove 'not-iterable' diagnostic
118
- [a, * b, c, d] = (1 , 2 , 3 , 4 , 5 , 6 ) # error: "Object of type `None` is not iterable"
115
+ [a, * b, c, d] = (1 , 2 , 3 , 4 , 5 , 6 )
119
116
reveal_type(a) # revealed: Literal[1]
120
117
# TODO : Should be list[int] once support for assigning to starred expression is added
121
118
reveal_type(b) # revealed: @Todo
@@ -126,8 +123,7 @@ reveal_type(d) # revealed: Literal[6]
126
123
### Starred expression (5)
127
124
128
125
``` py
129
- # TODO : Remove 'not-iterable' diagnostic
130
- [a, b, * c] = (1 , 2 , 3 , 4 ) # error: "Object of type `None` is not iterable"
126
+ [a, b, * c] = (1 , 2 , 3 , 4 )
131
127
reveal_type(a) # revealed: Literal[1]
132
128
reveal_type(b) # revealed: Literal[2]
133
129
# TODO : Should be list[int] once support for assigning to starred expression is added
@@ -215,8 +211,7 @@ reveal_type(b) # revealed: LiteralString
215
211
216
212
``` py
217
213
# TODO : Add diagnostic (need more values to unpack)
218
- # TODO : Remove 'not-iterable' diagnostic
219
- (a, * b, c, d) = " ab" # error: "Object of type `None` is not iterable"
214
+ (a, * b, c, d) = " ab"
220
215
reveal_type(a) # revealed: LiteralString
221
216
# TODO : Should be list[LiteralString] once support for assigning to starred expression is added
222
217
reveal_type(b) # revealed: @Todo
@@ -227,7 +222,7 @@ reveal_type(d) # revealed: Unknown
227
222
### Starred expression (2)
228
223
229
224
``` py
230
- (a, * b, c) = " ab" # error: "Object of type `None` is not iterable"
225
+ (a, * b, c) = " ab"
231
226
reveal_type(a) # revealed: LiteralString
232
227
# TODO : Should be list[Any] once support for assigning to starred expression is added
233
228
reveal_type(b) # revealed: @Todo
@@ -237,8 +232,7 @@ reveal_type(c) # revealed: LiteralString
237
232
### Starred expression (3)
238
233
239
234
``` py
240
- # TODO : Remove 'not-iterable' diagnostic
241
- (a, * b, c) = " abc" # error: "Object of type `None` is not iterable"
235
+ (a, * b, c) = " abc"
242
236
reveal_type(a) # revealed: LiteralString
243
237
# TODO : Should be list[LiteralString] once support for assigning to starred expression is added
244
238
reveal_type(b) # revealed: @Todo
@@ -248,8 +242,7 @@ reveal_type(c) # revealed: LiteralString
248
242
### Starred expression (4)
249
243
250
244
``` py
251
- # TODO : Remove 'not-iterable' diagnostic
252
- (a, * b, c, d) = " abcdef" # error: "Object of type `None` is not iterable"
245
+ (a, * b, c, d) = " abcdef"
253
246
reveal_type(a) # revealed: LiteralString
254
247
# TODO : Should be list[LiteralString] once support for assigning to starred expression is added
255
248
reveal_type(b) # revealed: @Todo
@@ -260,8 +253,7 @@ reveal_type(d) # revealed: LiteralString
260
253
### Starred expression (5)
261
254
262
255
``` py
263
- # TODO : Remove 'not-iterable' diagnostic
264
- (a, b, * c) = " abcd" # error: "Object of type `None` is not iterable"
256
+ (a, b, * c) = " abcd"
265
257
reveal_type(a) # revealed: LiteralString
266
258
reveal_type(b) # revealed: LiteralString
267
259
# TODO : Should be list[int] once support for assigning to starred expression is added
0 commit comments