-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Declare Dataset, DataArray, Variable, GroupBy unhashable (#8392)
* Add unhashable to generate_ops * Regenerate _typed_ops after adding "unhashable" * Fix variable redefinition The previous commit revealed the following mypy error: xarray/core/dataset.py: note: In member "swap_dims" of class "Dataset": xarray/core/dataset.py:4415: error: Incompatible types in assignment (expression has type "Variable", variable has type "Hashable") [assignment] xarray/core/dataset.py:4415: note: Following member(s) of "Variable" have conflicts: xarray/core/dataset.py:4415: note: __hash__: expected "Callable[[], int]", got "None" xarray/core/dataset.py:4416: error: "Hashable" has no attribute "dims" [attr-defined] xarray/core/dataset.py:4419: error: "Hashable" has no attribute "to_index_variable" [attr-defined] xarray/core/dataset.py:4430: error: "Hashable" has no attribute "to_base_variable" [attr-defined]
- Loading branch information
Showing
3 changed files
with
43 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters