Skip to content

Commit 79f15ef

Browse files
committed
typing fixes
1 parent a4bda14 commit 79f15ef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module = [
9191
"cf_units.*",
9292
"cfgrib.*",
9393
"cftime.*",
94+
"cloudpickle.*",
9495
"cubed.*",
9596
"cupy.*",
9697
"dask.types.*",

xarray/core/parallel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from xarray.core.dataset import Dataset
1515
from xarray.core.merge import merge
1616
from xarray.core.pycompat import is_dask_collection
17+
from xarray.core.variable import Variable
1718

1819
if TYPE_CHECKING:
1920
from xarray.core.types import T_Xarray
@@ -290,8 +291,9 @@ def _wrapper(
290291
f"Expected length {expected['shapes'][name]}."
291292
)
292293

294+
# ChainMap wants MutableMapping, but xindexes is Mapping
293295
merged_indexes = collections.ChainMap(
294-
expected["indexes"], merged_coordinates.xindexes
296+
expected["indexes"], merged_coordinates.xindexes # type: ignore[arg-type]
295297
)
296298
expected_index = merged_indexes.get(name, None)
297299
if expected_index is not None and not index.equals(expected_index):
@@ -467,6 +469,7 @@ def subset_dataset_to_block(
467469

468470
chunk_tuple = tuple(chunk_index.values())
469471
chunk_dims_set = set(chunk_index)
472+
variable: Variable
470473
for name, variable in dataset.variables.items():
471474
# make a task that creates tuple of (dims, chunk)
472475
if dask.is_dask_collection(variable.data):

0 commit comments

Comments
 (0)