-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Hashable and List are considered overlapping #7328
Comments
This a known problem, and is not a purely mypy issue, but more like a typeshed one, see python/typeshed#2148. TBH, I don't see a problem in having few |
4 tasks
nbren12
added a commit
to nbren12/xarray
that referenced
this issue
Jun 10, 2020
Sadly this is not working with my version of mypy. See python/mypy#7328
crusaderky
added a commit
to pydata/xarray
that referenced
this issue
Jun 15, 2020
* Improve typehints of xr.Dataset.__getitem__ Resolves #4125 * Add overload for Mapping behavior Sadly this is not working with my version of mypy. See python/mypy#7328 * Overload only Hashable inputs Given mypy's use of overloads, I think this is all we can do. If the argument is not Hashable, then return the Union type as before. * Lint * Quote the DataArray to avoid error in py3.6 * Code review Co-authored-by: crusaderky <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this is a bug:
mypy (0.720) reports:
I would expect this to work without complaints. Python lists are not hashable, unless you make some strange subclass.
The text was updated successfully, but these errors were encountered: