-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Mypy errors with the last version of _typed_ops.pyi #5755
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
Before T_Dataset etc. was: xarray/xarray/core/_typed_ops.pyi Lines 20 to 22 in d58a511
Now it is: Lines 20 to 22 in 6b59d9a
This seems fixable by adding back xarray/xarray/core/_typed_ops.pyi Lines 19 to 22 in d58a511
What I wonder about is why we called it |
Edit: @Illviljan and I commented at the same time, he seems to have found the error! Great spot @benbovy . I think what's happening is that the standard run only checks ref https://github.com/pre-commit/mirrors-mypy/issues/33 for the pre-commit issue. On the errors themselves — @rhkleijn I think I have upset your magnum opus despite the best of intentions. If you're up for having a look, that would be great. Otherwise we could try and revert my original PR, though I worry this sort of refactor is difficult to revert. |
The goal was for the type that's used throughout Xarray to be called Should we change that back, and change the mypy file files definition to |
Agreed and maybe add a comment/TODO why it's called |
Thank you very much @max-sixty and @Illviljan for looking into this and for the PR! |
What happened:
Since #5569 I get a lot of mypy errors from
_typed_ops.pyi
(see below). What's weird is that it is not happening in all cases:I also tried
pre-commit clean
with no luck. EDIT: I also tried on a freshly cloned xarray repository.@max-sixty @Illviljan Any idea on what's happening?
What you expected to happen:
No mypy error in all cases.
Anything else we need to know?:
Environment:
mypy 0.910
python 3.9.6 (also tested with 3.8)
The text was updated successfully, but these errors were encountered: