Skip to content

Commit 49b7622

Browse files
Apply ruff preview rule RUF036
RUF036 `None` not at the end of the type annotation.
1 parent b6b2e59 commit 49b7622

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
@@ -2108,7 +2108,7 @@ def filters(self) -> tuple[numcodecs.abc.Codec, ...] | tuple[ArrayArrayCodec, ..
21082108
return self._async_array.filters
21092109

21102110
@property
2111-
def serializer(self) -> None | ArrayBytesCodec:
2111+
def serializer(self) -> ArrayBytesCodec | None:
21122112
"""
21132113
Array-to-bytes codec to use for serializing the chunks into bytes.
21142114
"""

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
@@ -123,7 +123,7 @@ def clear_store(x: Store) -> Store:
123123

124124

125125
@st.composite
126-
def dimension_names(draw: st.DrawFn, *, ndim: int | None = None) -> list[None | str] | None:
126+
def dimension_names(draw: st.DrawFn, *, ndim: int | None = None) -> list[str | None] | None:
127127
simple_text = st.text(zarr_key_chars, min_size=0)
128128
return draw(st.none() | st.lists(st.none() | simple_text, min_size=ndim, max_size=ndim)) # type: ignore[arg-type]
129129

0 commit comments

Comments
 (0)