-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fails mypy --strict
because of reexports
#3868
Comments
Feel free to send a PR :) |
Would it be OK stylewise to just convert to a bunch of |
That's a question to @asvetlov. I don't mind personally. |
Yes. Whatever works for you and Please make sure that both |
Pull requests are ready. I'm not touching other mypy stuff yet as more work is required there, and these changes seem to be sufficient to unbreak consumer code. |
Ping? |
I'm deferring the merge to @asvetlov |
Fixed by #3872 |
should we also make our CIs use strict mode? |
Make sense. |
I don't know why our CI didn't catch it then |
Mypy version for CI is fixed at rather old Regarding strict mode, it would be nice to enable it too, but note that it can't be set via
I also set foo = None
...
foo = 1
if bar && foo: # "right hand of && is always false"
... # "dead code" Fixed like this: foo: Optional[int] = None
...
foo = 1
if bar && foo:
... |
@AMDmi3 I'd be glad to accept a series of PRs gradually fixing those mypy issues along with adding options and modifying |
Ok, I'll try to figure something out. |
See #3927 |
Long story short
With python 3.7, fresh mypy 0.711:
This happens because
mypy --strict
expects imported stuff reexported as inwhile
aiohttp/__init.py__
just imports stuff:Related: python/mypy#7067
Expected behaviour
Clean
mypy --strict
, as these errors break checking code which uses aiohttpThe text was updated successfully, but these errors were encountered: