Skip to content

Commit 1aaa37a

Browse files
Apply ruff/flake8-pie rule PIE808
PIE808 Unnecessary `start` argument in `range`
1 parent 7dce357 commit 1aaa37a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/zarr/codecs/gzip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
def parse_gzip_level(data: JSON) -> int:
2222
if not isinstance(data, (int)):
2323
raise TypeError(f"Expected int, got {type(data)}")
24-
if data not in range(0, 10):
24+
if data not in range(10):
2525
raise ValueError(
2626
f"Expected an integer from the inclusive range (0, 9). Got {data} instead."
2727
)

src/zarr/core/chunk_grids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def to_dict(self) -> dict[str, JSON]:
182182

183183
def all_chunk_coords(self, array_shape: ChunkCoords) -> Iterator[ChunkCoords]:
184184
return itertools.product(
185-
*(range(0, ceildiv(s, c)) for s, c in zip(array_shape, self.chunk_shape, strict=False))
185+
*(range(ceildiv(s, c)) for s, c in zip(array_shape, self.chunk_shape, strict=False))
186186
)
187187

188188
def get_nchunks(self, array_shape: ChunkCoords) -> int:

0 commit comments

Comments
 (0)