David Peter
e345307260
[red-knot] Fix diagnostic range for non-iterable unpacking assignments ( #15994 )
...
## Summary
I noticed that the diagnostic range in specific unpacking assignments is
wrong. For this example
```py
a, b = 1
```
we previously got (see first commit):
```
error: lint:not-iterable
--> /src/mdtest_snippet.py:1:1
|
1 | a, b = 1
| ^^^^ Object of type `Literal[1]` is not iterable
|
```
and with this change, we get:
```
error: lint:not-iterable
--> /src/mdtest_snippet.py:1:8
|
1 | a, b = 1
| ^ Object of type `Literal[1]` is not iterable
|
```
## Test Plan
New snapshot tests.
2025-02-06 15:36:22 +01:00
..
2025-02-04 08:27:17 +01:00
2025-02-04 08:27:17 +01:00
2025-02-03 09:27:29 +00:00
2024-12-21 11:33:10 +01:00
2025-02-04 08:27:17 +01:00
2025-01-24 12:47:48 +01:00
2025-02-05 22:26:15 +01:00
2025-01-24 12:47:48 +01:00
2025-01-05 18:35:29 +00:00
2024-12-17 09:49:39 +05:30
2025-02-06 15:36:22 +01:00
2025-02-03 09:27:29 +00:00
2025-02-05 17:47:49 -05:00
2025-02-04 08:27:17 +01:00
2024-12-06 12:55:56 -08:00
2025-02-06 14:08:20 +00:00
2025-01-16 11:21:56 -08:00
2025-01-24 12:47:48 +01:00
2025-02-03 09:27:29 +00:00
2025-02-04 08:27:17 +01:00
2025-02-05 22:26:15 +01:00
2025-02-05 22:26:15 +01:00
2025-02-06 15:36:22 +01:00
2025-02-04 08:27:17 +01:00
2025-02-03 09:27:29 +00:00
2025-02-05 22:26:15 +01:00
2025-02-04 08:27:17 +01:00
2025-02-05 22:26:15 +01:00
2025-02-03 09:27:29 +00:00
2025-02-04 12:40:07 -08:00
2025-02-03 09:27:29 +00:00
2024-10-31 21:00:51 +00:00
2025-02-06 07:15:26 +00:00
2025-02-05 19:47:43 +01:00
2024-12-19 21:02:14 +00:00
2025-02-04 08:27:17 +01:00
2025-02-03 09:27:29 +00:00
2024-12-06 02:41:33 +00:00
2025-02-04 08:27:17 +01:00
2025-02-03 09:27:29 +00:00
2025-02-04 08:27:17 +01:00
2025-02-04 08:27:17 +01:00
2025-02-04 08:27:17 +01:00
2025-01-20 09:55:54 +01:00
2025-01-24 12:47:48 +01:00
2025-02-06 07:15:26 +00:00
2025-01-15 11:21:01 +01:00
2025-02-05 22:26:15 +01:00
2025-02-05 17:47:49 -05:00
2025-02-05 22:26:15 +01:00
2025-01-10 14:04:03 +01:00
2025-02-03 09:27:29 +00:00