diff --git a/virtualizarr/manifests/manifest.py b/virtualizarr/manifests/manifest.py index 9cb25177..530ce17c 100644 --- a/virtualizarr/manifests/manifest.py +++ b/virtualizarr/manifests/manifest.py @@ -70,7 +70,7 @@ class ChunkManifest: so it's not possible to have a ChunkManifest object that does not represent a valid grid of chunks. """ - _paths: np.ndarray[Any, np.dtypes.StringDType] + _paths: np.ndarray[Any, np.dtypes.StringDType] # type: ignore[name-defined] _offsets: np.ndarray[Any, np.dtype[np.int32]] _lengths: np.ndarray[Any, np.dtype[np.int32]] @@ -99,7 +99,7 @@ def __init__(self, entries: dict) -> None: shape = get_chunk_grid_shape(entries.keys()) # Initializing to empty implies that entries with path='' are treated as missing chunks - paths = np.empty(shape=shape, dtype=np.dtypes.StringDType()) + paths = np.empty(shape=shape, dtype=np.dtypes.StringDType()) # type: ignore[attr-defined] offsets = np.empty(shape=shape, dtype=np.dtype("int32")) lengths = np.empty(shape=shape, dtype=np.dtype("int32")) @@ -127,7 +127,7 @@ def __init__(self, entries: dict) -> None: @classmethod def from_arrays( cls, - paths: np.ndarray[Any, np.dtype[np.dtypes.StringDType]], + paths: np.ndarray[Any, np.dtype[np.dtypes.StringDType]], # type: ignore[name-defined] offsets: np.ndarray[Any, np.dtype[np.int32]], lengths: np.ndarray[Any, np.dtype[np.int32]], ) -> "ChunkManifest": @@ -157,7 +157,7 @@ def from_arrays( ) # check dtypes - if paths.dtype != np.dtypes.StringDType(): + if paths.dtype != np.dtypes.StringDType(): # type: ignore[attr-defined] raise ValueError( f"paths array must have a numpy variable-length string dtype, but got dtype {paths.dtype}" ) diff --git a/virtualizarr/zarr.py b/virtualizarr/zarr.py index dbba794a..22b46ffb 100644 --- a/virtualizarr/zarr.py +++ b/virtualizarr/zarr.py @@ -109,7 +109,7 @@ def replace( compressor: Optional[str] = None, dtype: Optional[np.dtype] = None, fill_value: Optional[float] = None, # float or int? - filters: Optional[list[dict]] = None, + filters: Optional[list[dict]] = None, # type: ignore[valid-type] order: Optional[Literal["C"] | Literal["F"]] = None, shape: Optional[tuple[int, ...]] = None, zarr_format: Optional[Literal[2] | Literal[3]] = None,