Commit a7e477f
Make NoneType annotation error a new code (#20222)
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 #20218
---------
Co-authored-by: A5rocks <[email protected]>1 parent 6cfdd8c commit a7e477f
File tree
3 files changed
+26
-1
lines changed- docs/source
- mypy
3 files changed
+26
-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 | + | |
| 239 | + | |
218 | 240 | | |
219 | 241 | | |
220 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
| 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