Skip to content

Commit 6bbd4df

Browse files
committed
lint
1 parent 87e4396 commit 6bbd4df

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/zarr/core/array.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4790,10 +4790,10 @@ def _parse_chunk_encoding_v2(
47904790
)
47914791
)
47924792
if object_codec_id is None:
4793-
if isinstance(dtype, VariableLengthUTF8):
4794-
codec_name = "the numcodecs.VLenUTF8 codec"
4795-
elif isinstance(dtype, VariableLengthBytes):
4796-
codec_name = "the numcodecs.VLenBytes codec"
4793+
if isinstance(dtype, VariableLengthUTF8): # type: ignore[unreachable]
4794+
codec_name = "the numcodecs.VLenUTF8 codec" # type: ignore[unreachable]
4795+
elif isinstance(dtype, VariableLengthBytes): # type: ignore[unreachable]
4796+
codec_name = "the numcodecs.VLenBytes codec" # type: ignore[unreachable]
47974797
else:
47984798
codec_name = f"an unknown object codec with id {dtype.object_codec_id!r}"
47994799
msg = (

tests/test_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ def to_native_dtype(self) -> np.dtypes.ObjectDType:
18691869
np.dtypes.ObjectDType
18701870
The NumPy object dtype.
18711871
"""
1872-
return np.dtype("o")
1872+
return np.dtype("o") # type: ignore[return-value]
18731873

18741874

18751875
@pytest.mark.parametrize(
@@ -1885,7 +1885,7 @@ def test_chunk_encoding_no_object_codec_errors(dtype: ZDType[Any, Any]) -> None:
18851885
elif isinstance(dtype, VariableLengthBytes):
18861886
codec_name = "the numcodecs.VLenBytes codec"
18871887
else:
1888-
codec_name = f"an unknown object codec with id {dtype.object_codec_id!r}"
1888+
codec_name = f"an unknown object codec with id {dtype.object_codec_id!r}" # type: ignore[attr-defined]
18891889
msg = (
18901890
f"Data type {dtype} requires {codec_name}, "
18911891
"but no such codec was specified in the filters or compressor parameters for "

0 commit comments

Comments
 (0)