Repository navigation
Commit 9681b26
committed
Use isinstance information when type checking 'or' expressions
Note: This is not the same as python#942. It does address a pattern which
occurs at least once in mypy itself though:
```
if res and (not isinstance(res, Instance) or cast(Instance, res).args):
```1 parent 838b4e0 commit 9681b26
2 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
1081 | | - | |
1082 | | - | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1083 | 1086 | | |
1084 | 1087 | | |
1085 | 1088 | | |
1086 | | - | |
| 1089 | + | |
1087 | 1090 | | |
1088 | 1091 | | |
1089 | | - | |
1090 | | - | |
| 1092 | + | |
| 1093 | + | |
1091 | 1094 | | |
1092 | 1095 | | |
1093 | 1096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
734 | 740 | | |
735 | 741 | | |
736 | 742 | | |
| |||
0 commit comments