Commit 2298829
authored
attrs: remove fields type check (#15983)
Since python-attrs/attrs#890 (≥ 22.1.0)
`attrs.fields` is typed to accept a protocol.
Since python-attrs/attrs#997 (≥ 22.2.0)
`attrs.has` is a type-guard.
Support both by removing the explicit error reporting and letting it
fall through to the type stub.
Fixes #15980.1 parent 379b52f commit 2298829
File tree
3 files changed
+20
-14
lines changed- mypy/plugins
- test-data/unit
- lib-stub/attrs
3 files changed
+20
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | 1114 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
1600 | 1599 | | |
1601 | | - | |
| 1600 | + | |
1602 | 1601 | | |
1603 | 1602 | | |
1604 | 1603 | | |
1605 | 1604 | | |
1606 | 1605 | | |
1607 | | - | |
1608 | | - | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
1609 | 1611 | | |
1610 | 1612 | | |
1611 | 1613 | | |
| |||
2167 | 2169 | | |
2168 | 2170 | | |
2169 | 2171 | | |
2170 | | - | |
| 2172 | + | |
| 2173 | + | |
2171 | 2174 | | |
2172 | 2175 | | |
2173 | 2176 | | |
| |||
2216 | 2219 | | |
2217 | 2220 | | |
2218 | 2221 | | |
2219 | | - | |
| 2222 | + | |
| 2223 | + | |
2220 | 2224 | | |
2221 | 2225 | | |
2222 | 2226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
5 | 12 | | |
6 | 13 | | |
7 | 14 | | |
| |||
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
134 | | - | |
135 | | - | |
| 141 | + | |
| 142 | + | |
0 commit comments