-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Mypy 0.710 broke support for inline weak import comments #7024
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
Comments
What does Starting with version 0.710, If there is a particularly well established use of |
Apparently this used to do something before mypy 0.4.5: http://mypy-lang.blogspot.com/2016/10/mypy-045-released.html (see under "Deprecations and Removals"). Mypy has been ignoring these comments for years though. |
As far as I can tell, Your explanation on why this is now an error makes sense, Unfortunately I couldn't tell you what |
Happy to close this issue with the resolution that this is a |
Today I learn! |
Are you reporting a bug, or opening a feature request?
I'm reporting a breaking change in mypy 0.710
Please insert below the code you are checking with mypy
The following import at the top of a file no longer works
What is the actual behavior/output?
<path_to_file>:1: error: Unrecognized option: weak = import
What is the behavior/output you expect?
It is expected that mypy allows weak imports in the file, or at the very least doesn't raise an error.
What are the versions of mypy and Python you are using?
Python version:
3.7
mypy version:
0.710
mypy-extensions version:
0.4.1
typed-ast version:
1.4.0
What are the mypy flags you are using? (For example --strict-optional)
The exact command we are running is
mypy --ignore-missing-imports --disallow-untyped-defs --strict-optional
I have yet to find which exact version of mypy had this breaking change.
I just thought I'd make this issue, and see if you are aware/have a recommended fix for this.
I appreciate any help you provide and I'm happy to provide further details if necessary.
The text was updated successfully, but these errors were encountered: