Skip to content

Commit

Permalink
Protect zarr import
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Oct 22, 2024
1 parent 9b471ec commit 8cd5237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtualizarr/writers/icechunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from xarray import Dataset
from xarray.backends.zarr import encode_zarr_attr_value
from xarray.core.variable import Variable
from zarr import Group # type: ignore[import-untyped]

from virtualizarr.manifests import ChunkManifest, ManifestArray
from virtualizarr.zarr import encode_dtype
Expand Down Expand Up @@ -36,6 +35,7 @@ def dataset_to_icechunk(ds: Dataset, store: "IcechunkStore") -> None:
store: IcechunkStore
"""
from icechunk import IcechunkStore # type: ignore[import-not-found]
from zarr import Group # type: ignore[import-untyped]

if not isinstance(store, IcechunkStore):
raise TypeError(f"expected type IcechunkStore, but got type {type(store)}")
Expand Down

0 comments on commit 8cd5237

Please sign in to comment.