-
Notifications
You must be signed in to change notification settings - Fork 179
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
In PEP 484 type comments, allow text after "# type: ignore" #455
Conversation
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.
141947f
to
e6905ee
Compare
This is to support allowing typecheckers to implement ignores for specific errors, using syntax like `# type: ignore=E1000` or `# type: ignore[type-mismatch` or some such. mypy is about to add support for ignoring specific errors following this design: python/mypy#7239 Support for extra text in type comments was implemented in CPython as https://bugs.python.org/issue36878 and in typed_ast as python/typed_ast#116.
e6905ee
to
b9267e1
Compare
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.
We can't use specific type ignores yet as there is no pyflakes release with this change in: PyCQA/pyflakes#455
Any release planned so we can see this fix on PyPI? |
not yet, please be patient (this comment is not productive) we'll release when we're ready! |
Clean up some type hints.
This PR enables `--strict-equality` and `--show-error-codes` for self-check, and adds error codes in some `# type: ignore`s. So far this revealed two issues: * Both PyCharm and flake8 get crazy about error codes, generating many false positives * Error codes in `# type: ignore`s don't always work, see #7384
Ref: PyCQA/pyflakes#455 (cherry picked from commit 2393b58)
Ref: PyCQA/pyflakes#455 (cherry picked from commit 2393b58)
Ref: PyCQA/pyflakes#455 (cherry picked from commit 2393b58)
This release includes PyCQA/pyflakes#455
This release includes PyCQA/pyflakes#455
This is to support allowing typecheckers to implement ignores for
specific errors, using syntax like
# type: ignore=E1000
or# type: ignore[type-mismatch]
or some such.mypy is about to add support for ignoring specific errors following
this design: python/mypy#7239
Support for extra text in type comments was implemented
in CPython as https://bugs.python.org/issue36878
and in typed_ast as python/typed_ast#116.