Commit 895a821
authored
Fix line number if __iter__ is incorrectly reported as missing (#14893)
A type was used as error context, but types don't reliably have valid
line numbers during type checking. Pass context explicitly instead.
The error in the test case is actually a false positive, but I'm first
fixing the line number of the error, since it seems plausible that the
wrong line number could cause other problems.
Work on #14892.1 parent 4365dad commit 895a821
File tree
3 files changed
+28
-10
lines changed- mypy
- test-data/unit
3 files changed
+28
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3299 | 3299 | | |
3300 | 3300 | | |
3301 | 3301 | | |
3302 | | - | |
| 3302 | + | |
3303 | 3303 | | |
3304 | 3304 | | |
3305 | 3305 | | |
3306 | 3306 | | |
3307 | 3307 | | |
3308 | 3308 | | |
3309 | | - | |
| 3309 | + | |
3310 | 3310 | | |
3311 | 3311 | | |
3312 | 3312 | | |
| |||
3635 | 3635 | | |
3636 | 3636 | | |
3637 | 3637 | | |
3638 | | - | |
| 3638 | + | |
3639 | 3639 | | |
3640 | 3640 | | |
3641 | 3641 | | |
| |||
6392 | 6392 | | |
6393 | 6393 | | |
6394 | 6394 | | |
6395 | | - | |
| 6395 | + | |
| 6396 | + | |
| 6397 | + | |
6396 | 6398 | | |
6397 | 6399 | | |
6398 | 6400 | | |
| |||
6401 | 6403 | | |
6402 | 6404 | | |
6403 | 6405 | | |
6404 | | - | |
| 6406 | + | |
6405 | 6407 | | |
6406 | 6408 | | |
6407 | 6409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7797 | 7797 | | |
7798 | 7798 | | |
7799 | 7799 | | |
| 7800 | + | |
| 7801 | + | |
| 7802 | + | |
| 7803 | + | |
| 7804 | + | |
| 7805 | + | |
| 7806 | + | |
| 7807 | + | |
| 7808 | + | |
| 7809 | + | |
| 7810 | + | |
| 7811 | + | |
| 7812 | + | |
| 7813 | + | |
| 7814 | + | |
| 7815 | + | |
0 commit comments