-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Mypy Self Checking Should Enable --warn-unreachable #18079
Comments
Please, feel free to send a PR. |
I tried this in the past and found that it caused too many false-positive errors in the self-check at that point to make it feasible. For example, branches under The reachability heuristics mypy uses may have improved since then, though; it was a while ago that I tried it. |
I don't think this is the case anymore. I also haven't had any problems with it in my personal projects and going randomly through 8 of the 39 issues raised above, Mypy seems to be correct about all of them except maybe one that is related to |
I think turning this option on for mypy itself would be a good way to dogfood it and force ourselves to make sure it is reliable. |
I absolutely agree that this would be worth it if it is possible! I wasn't trying to dissuade anybody, was just giving context on something I previously tried a while back :-) And, it may well be that the check has improved significantly since I tried it last! |
Is it intentional that
--warn-unreachable
is not used while self checking in the CI? (with mypy_self_check.ini)I have recently realized that this is not turned on and it feels a bit strange. There are about 39 errors when running with --warn-unreachable and it brings up a few questionable things like https://github.com/python/mypy/blob/master/mypy/test/testpep561.py#L180.
@sobolevn told me to create this issue in #18076 (comment)
The text was updated successfully, but these errors were encountered: