Skip to content

Commit 6a208eb

Browse files
committed
lint and fix typo
1 parent fee48d3 commit 6a208eb

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/zarr/codecs/transpose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def validate(
5656
) -> None:
5757
if len(self.order) != len(shape):
5858
raise ValueError(
59-
f"The `order` tuple needs have as many entries as there are dimensions in the array. Got {self.order}."
59+
f"The `order` tuple must have as many entries as there are dimensions in the array. Got {self.order}."
6060
)
6161
if len(self.order) != len(set(self.order)):
6262
raise ValueError(
@@ -71,7 +71,7 @@ def evolve_from_array_spec(self, array_spec: ArraySpec) -> Self:
7171
ndim = array_spec.ndim
7272
if len(self.order) != ndim:
7373
raise ValueError(
74-
f"The `order` tuple needs have as many entries as there are dimensions in the array. Got {self.order}."
74+
f"The `order` tuple must have as many entries as there are dimensions in the array. Got {self.order}."
7575
)
7676
if len(self.order) != len(set(self.order)):
7777
raise ValueError(

tests/test_codecs/test_codecs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ def test_invalid_metadata(codecs: tuple[Codec, ...]) -> None:
304304
shape = (16,)
305305
chunks = (16,)
306306
data_type = UInt8()
307-
with pytest.raises(ValueError):
307+
with pytest.raises(ValueError, match="The `order` tuple must have as many entries"):
308308
ArrayV3Metadata(
309309
shape=shape,
310310
chunk_grid={"name": "regular", "configuration": {"chunk_shape": chunks}},
311-
chunk_key_encoding={"name": "default", "configuration": {"separator": "/"}},
311+
chunk_key_encoding={"name": "default", "configuration": {"separator": "/"}}, # type: ignore[arg-type]
312312
fill_value=0,
313313
data_type=data_type,
314314
codecs=codecs,

0 commit comments

Comments
 (0)