Skip to content

Commit 7728d7f

Browse files
committed
fix mypy
1 parent a7553a7 commit 7728d7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/zarr/api/asynchronous.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,19 +555,19 @@ async def array(
555555

556556
new_array = await create(data.shape, **kwargs)
557557

558-
async def _copy_chunk(chunk_coords: ChunkCoords | slice) -> None:
559-
arr = await data._async_array.getitem(chunk_coords)
558+
async def _copy_chunk(chunk_coords: ChunkCoords | slice, _data: Array) -> None:
559+
arr = await _data._async_array.getitem(chunk_coords)
560560
await new_array.setitem(chunk_coords, arr)
561561

562562
if new_array.chunks == data.chunks:
563563
# Stream data from the source array to the new array
564564
await concurrent_map(
565-
[(region,) for region in data._iter_chunk_regions()],
565+
[(region,data) for region in data._iter_chunk_regions()],
566566
_copy_chunk,
567567
config.get("async.concurrency"),
568568
)
569569
else:
570-
await _copy_chunk(slice(None))
570+
await _copy_chunk(slice(None), data)
571571
return new_array
572572

573573
# ensure data is array-like

0 commit comments

Comments
 (0)