-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Remove show_none_errors and strict_optional_whitelist #13507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
These are somewhat buggy and modern per-module options should be preferred. I can't find any use of strict_optional_whitelist. There is some use of show_none_errors, but it's all set to True; I think people are just worried and cargo culting and want mypy to really, actually give them all the errors. Fixes python#6514, fixes python#2396
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
`show_none_errors` is deprecated, see python/mypy#13507
`show_none_errors` is deprecated, see python/mypy#13507
`show_none_errors` is deprecated, see python/mypy#13507
`show_none_errors` is deprecated, see python/mypy#13507
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am strongly +1 on this, --strict-optional
is the only right way!
However, mypy primer shows some errors. We can pro-actively create PRs to these repos.
I already made PRs, see the links^ |
Diff from mypy_primer, showing the effect of this PR on open source code: dragonchain (https://github.com/dragonchain/dragonchain)
+ mypy.ini: [mypy]: Unrecognized option: show_none_errors = True
pandas (https://github.com/pandas-dev/pandas)
+ pyproject.toml: [mypy]: Unrecognized option: show_none_errors = True
stone (https://github.com/dropbox/stone)
+ mypy.ini: [mypy]: Unrecognized option: show_none_errors = True
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't even remember that we had these! These only added confusion.
Remove use of deprecated mypy option `show_none_errors` is deprecated, see python/mypy#13507
Remove use of deprecated mypy option `show_none_errors` is deprecated, see python/mypy#13507
`show_none_errors` is deprecated, see python/mypy#13507
`show_none_errors` is deprecated, see python/mypy#13507
These are somewhat buggy and modern per-module options should be
preferred. I can't find any use of strict_optional_whitelist.
There is some use of show_none_errors, but it's all set to True;
I think people are just worried and cargo culting and want mypy to
really, actually give them all the errors.
Fixes #6514, fixes #2396