-
Notifications
You must be signed in to change notification settings - Fork 301
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
Add support for type checking with upcomming Numpy 1.20 release. #2499
Conversation
0d3cb56
to
f9cbc8a
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.
while this does run with older versions of numpy it does not type check
you mean that it doesn't typecheck with "old verions of numpy" (and the current version of stubs)? then it sounds like the best thing to do is to wait for 1.20 to be released, merge this PR immediately then, and never worry about 1.19 and before ever again.
0669144
to
6497693
Compare
6497693
to
0eb1ba0
Compare
Codecov Report
@@ Coverage Diff @@
## master #2499 +/- ##
==========================================
- Coverage 63.62% 63.60% -0.02%
==========================================
Files 198 198
Lines 25913 25929 +16
==========================================
+ Hits 16486 16493 +7
- Misses 9427 9436 +9 |
@jenshnielsen ok, good! is it worth waiting until the stubs start matching the types of numpy 1.20? or is the issue somewhere else? I guess since the stubs are not an official released project (right?), we'd better just stick to numpy 1.20 since it's the latest nunmpy that will alweays be installed when we run mypy in CI? |
@astafan8 The stubs are deprecated and will never be updated. The types in numpy 1.20 are the official source of truth |
Co-authored-by: Mikhail Astafev <astafan8@gmail.com>
they are not compatible with numpy 1.20 types so remove them once numpy 1.20 is out we will get type checking again
8d07bea
to
e714208
Compare
Checked locally with numpy 1.20 rc1
EDIT:
while this does run with older versions of numpy it does not type check. Not sure what the best solution is.
We can add ignores to those lines or just wait until numpy 1.20 is officially released. Or we could disable the non explicit generics for now.