Commit a35e3c0
authored
Prevent crash when enum/typeddict call is stored as a class attribute (python#18861)
Fixes python#18736. Includes same fix for TypedDict (also crashes on master)
and NamedTuple (does not crash as it rejects MemberExpr before setting
.analyzed, so just for the sake of consistency)1 parent 4fb187f commit a35e3c0
File tree
4 files changed
+48
-5
lines changed- mypy
- test-data/unit
4 files changed
+48
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3464 | 3464 | | |
3465 | 3465 | | |
3466 | 3466 | | |
3467 | | - | |
3468 | | - | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
3469 | 3470 | | |
3470 | 3471 | | |
3471 | 3472 | | |
| |||
3474 | 3475 | | |
3475 | 3476 | | |
3476 | 3477 | | |
3477 | | - | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
3478 | 3481 | | |
3479 | 3482 | | |
3480 | 3483 | | |
| |||
3515 | 3518 | | |
3516 | 3519 | | |
3517 | 3520 | | |
3518 | | - | |
3519 | | - | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
3520 | 3524 | | |
3521 | 3525 | | |
3522 | 3526 | | |
| |||
3540 | 3544 | | |
3541 | 3545 | | |
3542 | 3546 | | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
3543 | 3550 | | |
3544 | 3551 | | |
3545 | 3552 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2512 | 2512 | | |
2513 | 2513 | | |
2514 | 2514 | | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1519 | 1519 | | |
1520 | 1520 | | |
1521 | 1521 | | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4138 | 4138 | | |
4139 | 4139 | | |
4140 | 4140 | | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
0 commit comments