Skip to content

Commit 1faa899

Browse files
Run ruff format
1 parent 5e680af commit 1faa899

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/zarr/codecs/sharding.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ async def get(
8686
self, prototype: BufferPrototype, byte_range: ByteRequest | None = None
8787
) -> Buffer | None:
8888
assert byte_range is None, "byte_range is not supported within shards"
89-
assert (
90-
prototype == default_buffer_prototype()
91-
), f"prototype is not supported within shards currently. diff: {prototype} != {default_buffer_prototype()}"
89+
assert prototype == default_buffer_prototype(), (
90+
f"prototype is not supported within shards currently. diff: {prototype} != {default_buffer_prototype()}"
91+
)
9292
return self.shard_dict.get(self.chunk_coords)
9393

9494

src/zarr/core/indexing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ def is_pure_orthogonal_indexing(selection: Selection, ndim: int) -> TypeGuard[Or
289289
def get_chunk_shape(chunk_grid: ChunkGrid) -> ChunkCoords:
290290
from zarr.core.chunk_grids import RegularChunkGrid
291291

292-
assert isinstance(
293-
chunk_grid, RegularChunkGrid
294-
), "Only regular chunk grid is supported, currently."
292+
assert isinstance(chunk_grid, RegularChunkGrid), (
293+
"Only regular chunk grid is supported, currently."
294+
)
295295
return chunk_grid.chunk_shape
296296

297297

src/zarr/core/metadata/v3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@ def inner_codecs(self) -> tuple[Codec, ...]:
373373
def get_chunk_spec(
374374
self, _chunk_coords: ChunkCoords, array_config: ArrayConfig, prototype: BufferPrototype
375375
) -> ArraySpec:
376-
assert isinstance(
377-
self.chunk_grid, RegularChunkGrid
378-
), "Currently, only regular chunk grid is supported"
376+
assert isinstance(self.chunk_grid, RegularChunkGrid), (
377+
"Currently, only regular chunk grid is supported"
378+
)
379379
return ArraySpec(
380380
shape=self.chunk_grid.chunk_shape,
381381
dtype=self.dtype,

0 commit comments

Comments
 (0)