-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Disallow untyped calls in mypy check #4053
Disallow untyped calls in mypy check #4053
Conversation
Similar issue as in #4052 with numpy. The Python 3.7 CI run installs numpy 1.21.6, as numpy 1.22 and beyond drop Python 3.7 support (https://numpy.org/devdocs/release/1.22.0-notes.html). This means that there is no way to satisfy type annotations on older numpy, which is not fully type annotated and therefore triggers mypy's |
Codecov Report
@@ Coverage Diff @@
## master #4053 +/- ##
=======================================
Coverage 62.89% 62.89%
=======================================
Files 451 451
Lines 74585 74585
=======================================
+ Hits 46908 46911 +3
+ Misses 27677 27674 -3
Continue to review full report at Codecov.
|
…ars into mypy_disallow_untyped_calls
Hm, tough one. I think we want to keep mypy on Python 3.7 in our CI; I'll do some checks. Maybe we can merge these changes, but keep the flag disabled until we come up with a solution? |
Nice solution to override the mypy flag in the CI 👍 if the CI is happy, we can merge this. (CI checks are broken now though, it seems 😄 ) |
It is not ideal though. The real issue is the numpy version, rather than the Python version, so this does not work for anyone that develops with numpy < 1.22, even if at Python 3.10. I don't think this will bite much in practice, but my apologies in advance for anyone's time lost due to this little hack. |
The Python test CI checks are still not running, it seems. |
Tried to fix again, but it seems I am hitting this: https://github.community/t/matrix-cannot-be-used-in-jobs-level-if/17177/12. I.e., this is not possible, as the if-statement is evaluated before the matrix. The only solution I see now is to not use the matrix anymore, and thus duplicate the job effectively for Python 3.7. Open for anyone (with more GH Actions experience) to suggest a better solution. |
Thanks @zundertj and @stinodego. Merging it in. |
I had to revert this one because the github action yaml was invalid. We need to run the action if the action file has changed, I shall open an issue for this. @zundertj can you reopen the PR? |
Cannot re-open, see #4099. |
Fixes mypy "disallow_untyped_calls" in #4044 .