diff --git a/src/zarr/abc/codec.py b/src/zarr/abc/codec.py index 1d7106e25a..8ce9cc0043 100644 --- a/src/zarr/abc/codec.py +++ b/src/zarr/abc/codec.py @@ -187,10 +187,7 @@ async def decode_partial( Iterable[NDBuffer | None] """ return await concurrent_map( - [ - (byte_getter, selection, chunk_spec) - for byte_getter, selection, chunk_spec in batch_info - ], + list(batch_info), self._decode_partial_single, config.get("async.concurrency"), ) @@ -227,10 +224,7 @@ async def encode_partial( The chunk spec contains information about the chunk. """ await concurrent_map( - [ - (byte_setter, chunk_array, selection, chunk_spec) - for byte_setter, chunk_array, selection, chunk_spec in batch_info - ], + list(batch_info), self._encode_partial_single, config.get("async.concurrency"), ) @@ -402,7 +396,7 @@ async def batching_helper( batch_info: Iterable[tuple[CodecInput | None, ArraySpec]], ) -> list[CodecOutput | None]: return await concurrent_map( - [(chunk_array, chunk_spec) for chunk_array, chunk_spec in batch_info], + list(batch_info), noop_for_none(func), config.get("async.concurrency"), )