-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Get mypy itself type-checking cleanly under --strict-optional #1955
Comments
As of a version from master yesterday (commit I went through these errors to try to sort out which ones are bugs in mypy in its role as the type-checker, either in the Detailed notes here: Short summary:
I'll locate or file individual issues for the bugs in mypy-as-type-checker. I think a lot of the 334 lines of issues in mypy-as-target-codebase will be straightforward to fix, many of them in large swaths, by adding |
Two of the issues are
I think the other issues are as yet unfiled -- I'll start filing them. |
Filed also #1956, #1957, and #1958. The three issues that cause errors in many places are #1956, #1957, #1820. There are four more issues (in addition to #1734 and #1958) that cause an error in just one place each and probably aren't hard to just work around where they occur. Should definitely be filed and fixed, but I'm going AFK just now -- so as a temporary breadcrumb, here they are by the shorthand titles I gave them in my notes:
|
FYI, for counting error messages, instead of piping mypy's output through grep you can use |
This makes mypy completely --strict-optional clean. Fixes #1955.
This makes mypy completely --strict-optional clean. Fixes #1955.
One necessary milestone toward making
--strict-optional
a recommended thing to use; the default; and ultimately the only mode (following what PEP 484 already says) will be for the mypy implementation itself to pass type-checking under--strict-optional
. This is a tracking task for that goal.The text was updated successfully, but these errors were encountered: