diff --git a/virtualizarr/tests/test_writers/test_icechunk.py b/virtualizarr/tests/test_writers/test_icechunk.py index e9adc1ef..eede9ac2 100644 --- a/virtualizarr/tests/test_writers/test_icechunk.py +++ b/virtualizarr/tests/test_writers/test_icechunk.py @@ -8,7 +8,7 @@ import numpy as np import numpy.testing as npt -from xarray import Dataset, concat, open_dataset, open_zarr +from xarray import Coordinates, Dataset, concat, open_dataset, open_zarr from xarray.core.variable import Variable from zarr import Array, Group, group # type: ignore from zarr.core.metadata import ArrayV3Metadata # type: ignore @@ -374,7 +374,7 @@ def gen_virtual_variable( dims: list[str] = [], zarr_format: Literal[2, 3] = 2, attrs: dict[str, Any] = {}, -) -> tuple[Variable, Dataset]: +) -> Variable: manifest = generate_chunk_manifest( file_uri, shape=shape, @@ -414,7 +414,7 @@ def gen_virtual_dataset( length: int = 48, dims: Optional[list[str]] = None, zarr_format: Literal[2, 3] = 2, - coords: Optional[dict[str, Variable]] = None, + coords: Optional[Coordinates] = None, ) -> Dataset: ds = open_dataset(file_uri) ds_dims: list[str] = cast(list[str], list(ds.dims)) diff --git a/virtualizarr/writers/icechunk.py b/virtualizarr/writers/icechunk.py index a097bbb1..4258cb16 100644 --- a/virtualizarr/writers/icechunk.py +++ b/virtualizarr/writers/icechunk.py @@ -183,7 +183,7 @@ def write_virtual_variable_to_icechunk( append_axis = get_axis(dims, append_dim) # check if arrays can be concatenated - check_compatible_arrays(ma, group[name], append_axis) + check_compatible_arrays(ma, group[name], append_axis) # type: ignore[arg-type] check_compatible_encodings(var.encoding, group[name].attrs) # determine number of existing chunks along the append axis @@ -194,7 +194,7 @@ def write_virtual_variable_to_icechunk( # resize the array resize_array( - group[name], + group[name], # type: ignore[arg-type] manifest_array=ma, append_axis=append_axis, )