Commit 81bde70
committed
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]1 parent 9225906 commit 81bde70
1 file changed
+17
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4410 | 4410 | | |
4411 | 4411 | | |
4412 | 4412 | | |
4413 | | - | |
4414 | | - | |
| 4413 | + | |
| 4414 | + | |
4415 | 4415 | | |
4416 | | - | |
| 4416 | + | |
4417 | 4417 | | |
4418 | 4418 | | |
4419 | | - | |
| 4419 | + | |
| 4420 | + | |
| 4421 | + | |
4420 | 4422 | | |
4421 | | - | |
4422 | | - | |
| 4423 | + | |
| 4424 | + | |
4423 | 4425 | | |
4424 | 4426 | | |
4425 | 4427 | | |
| |||
4429 | 4431 | | |
4430 | 4432 | | |
4431 | 4433 | | |
4432 | | - | |
4433 | | - | |
| 4434 | + | |
| 4435 | + | |
4434 | 4436 | | |
4435 | | - | |
4436 | | - | |
| 4437 | + | |
| 4438 | + | |
4437 | 4439 | | |
4438 | | - | |
4439 | | - | |
4440 | | - | |
| 4440 | + | |
| 4441 | + | |
| 4442 | + | |
4441 | 4443 | | |
4442 | 4444 | | |
4443 | 4445 | | |
4444 | 4446 | | |
4445 | 4447 | | |
4446 | 4448 | | |
4447 | | - | |
| 4449 | + | |
4448 | 4450 | | |
4449 | | - | |
| 4451 | + | |
4450 | 4452 | | |
4451 | 4453 | | |
4452 | 4454 | | |
| |||
0 commit comments