Skip to content

Commit 954bb2e

Browse files
Apply ruff preview rule RUF036
RUF036 `None` not at the end of the type annotation.
1 parent 3dccd59 commit 954bb2e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/zarr/core/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2093,7 +2093,7 @@ def filters(self) -> tuple[numcodecs.abc.Codec, ...] | tuple[ArrayArrayCodec, ..
20932093
return self._async_array.filters
20942094

20952095
@property
2096-
def serializer(self) -> None | ArrayBytesCodec:
2096+
def serializer(self) -> ArrayBytesCodec | None:
20972097
"""
20982098
Array-to-bytes codec to use for serializing the chunks into bytes.
20992099
"""

src/zarr/core/chunk_grids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def _auto_partition(
216216
"""
217217
item_size = dtype.itemsize
218218
if shard_shape is None:
219-
_shards_out: None | tuple[int, ...] = None
219+
_shards_out: tuple[int, ...] | None = None
220220
if chunk_shape == "auto":
221221
_chunks_out = _guess_chunks(array_shape, item_size)
222222
else:

src/zarr/testing/strategies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def clear_store(x: Store) -> Store:
115115

116116

117117
@st.composite # type: ignore[misc]
118-
def dimension_names(draw: st.DrawFn, *, ndim: int | None = None) -> list[None | str] | None:
118+
def dimension_names(draw: st.DrawFn, *, ndim: int | None = None) -> list[str | None] | None:
119119
simple_text = st.text(zarr_key_chars, min_size=0)
120120
return draw(st.none() | st.lists(st.none() | simple_text, min_size=ndim, max_size=ndim)) # type: ignore[no-any-return]
121121

0 commit comments

Comments
 (0)