From 9234952fd7c314ed0ef6595ae4f09a93dac7e7f6 Mon Sep 17 00:00:00 2001 From: Max Jones <14077947+maxrjones@users.noreply.github.com> Date: Mon, 5 Jan 2026 13:38:30 -0500 Subject: [PATCH 1/3] Fix typing errors --- virtualizarr/manifests/array.py | 2 +- virtualizarr/manifests/array_api.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/virtualizarr/manifests/array.py b/virtualizarr/manifests/array.py index 3ef05983..406bfcc1 100644 --- a/virtualizarr/manifests/array.py +++ b/virtualizarr/manifests/array.py @@ -148,7 +148,7 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs) -> Any: return _isnan(self.shape) return NotImplemented - def __array__(self, dtype: np.typing.DTypeLike = None) -> np.ndarray: + def __array__(self, dtype: None = None) -> np.ndarray: raise NotImplementedError( "ManifestArrays can't be converted into numpy arrays or pandas Index objects" ) diff --git a/virtualizarr/manifests/array_api.py b/virtualizarr/manifests/array_api.py index 1651676b..238876d4 100644 --- a/virtualizarr/manifests/array_api.py +++ b/virtualizarr/manifests/array_api.py @@ -97,9 +97,14 @@ def concatenate( new_shape[axis] = new_length_along_concat_axis # do concatenation of entries in manifest - concatenated_paths = np.concatenate( - [arr.manifest._paths for arr in arrays], - axis=axis, + concatenated_paths = ( + cast( # `np.concatenate` is type hinted as if the output could have Any dtype + np.ndarray[Any, np.dtypes.StringDType], + np.concatenate( + [arr.manifest._paths for arr in arrays], + axis=axis, + ), + ) ) concatenated_offsets = np.concatenate( [arr.manifest._offsets for arr in arrays], From b9973bb4742d1f7048cb56a2fec023f704637d73 Mon Sep 17 00:00:00 2001 From: Max Jones <14077947+maxrjones@users.noreply.github.com> Date: Mon, 5 Jan 2026 17:25:38 -0500 Subject: [PATCH 2/3] Update virtualizarr/manifests/array.py Co-authored-by: Chuck Daniels --- virtualizarr/manifests/array.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualizarr/manifests/array.py b/virtualizarr/manifests/array.py index 406bfcc1..32365b4f 100644 --- a/virtualizarr/manifests/array.py +++ b/virtualizarr/manifests/array.py @@ -148,7 +148,7 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs) -> Any: return _isnan(self.shape) return NotImplemented - def __array__(self, dtype: None = None) -> np.ndarray: + def __array__(self, dtype: np.typing.DTypeLike | None = None, copy: bool | None = None) -> np.ndarray: raise NotImplementedError( "ManifestArrays can't be converted into numpy arrays or pandas Index objects" ) From c3c49f0ec9ec0808a2b243968a2db6adb7d9438f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 22:25:47 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- virtualizarr/manifests/array.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virtualizarr/manifests/array.py b/virtualizarr/manifests/array.py index 32365b4f..0c74077f 100644 --- a/virtualizarr/manifests/array.py +++ b/virtualizarr/manifests/array.py @@ -148,7 +148,9 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs) -> Any: return _isnan(self.shape) return NotImplemented - def __array__(self, dtype: np.typing.DTypeLike | None = None, copy: bool | None = None) -> np.ndarray: + def __array__( + self, dtype: np.typing.DTypeLike | None = None, copy: bool | None = None + ) -> np.ndarray: raise NotImplementedError( "ManifestArrays can't be converted into numpy arrays or pandas Index objects" )