We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug Report
Using this feature: https://mypy.readthedocs.io/en/stable/common_issues.html#python-version-and-system-platform-checks Expecting to be able to # type: ignore conditionally by python version.
# type: ignore
To Reproduce
import sys from typing import Text x = "hi" # type: str y = "hi" # type: Text if sys.version_info[0] >= 3: x = y else: x = y # type: ignore
https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=831f7b62f21f6c34b2ef4b490b22e0a0
Expected Behavior
Expected no errors when run targeting both python 3.10 and 2.7
Actual Behavior
Under targeting python 3.10, we see
main.py:8: error: unused "type: ignore" comment Found 1 error in 1 file (checked 1 source file)
The text was updated successfully, but these errors were encountered:
Dupe of #8823 (workarounds mentioned in that issue)
Sorry, something went wrong.
No branches or pull requests
Bug Report
Using this feature:
https://mypy.readthedocs.io/en/stable/common_issues.html#python-version-and-system-platform-checks
Expecting to be able to
# type: ignore
conditionally by python version.To Reproduce
https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=831f7b62f21f6c34b2ef4b490b22e0a0
Expected Behavior
Expected no errors when run targeting both python 3.10 and 2.7
Actual Behavior
Under targeting python 3.10, we see
The text was updated successfully, but these errors were encountered: