Commit 5baea2e
committed
Make NoneType annotation error a new code
Change the code of "NoneType should not be used as a type, please use None instead" error to be a new code, so that people who don't like this rule can disable it easily.
I haven't made this a subcode of valid-type because NoneType is actually a valid type; it's just dispreferred.
I have added the documentation for the new code, but haven't added any new tests (the old test still runs fine).
Fixes #202181 parent 66dd2c1 commit 5baea2e
File tree
3 files changed
+23
-1
lines changed- docs/source
- mypy
3 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
218 | 239 | | |
219 | 240 | | |
220 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
923 | | - | |
| 923 | + | |
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
| |||
0 commit comments