77from contextlib import contextmanager
88from typing import TYPE_CHECKING
99
10- from zarr .abc .store import AccessMode , Store
10+ from zarr .abc .store import AccessMode , ByteRangeRequest , Store
1111
1212if TYPE_CHECKING :
13- from collections .abc import AsyncGenerator , Generator
13+ from collections .abc import AsyncGenerator , Generator , Iterable
1414
1515 from zarr .core .buffer import Buffer , BufferPrototype
1616
@@ -125,7 +125,7 @@ async def get(
125125 async def get_partial_values (
126126 self ,
127127 prototype : BufferPrototype ,
128- key_ranges : list [tuple [str , tuple [ int | None , int | None ] ]],
128+ key_ranges : Iterable [tuple [str , ByteRangeRequest ]],
129129 ) -> list [Buffer | None ]:
130130 with self .log ():
131131 return await self ._store .get_partial_values (prototype = prototype , key_ranges = key_ranges )
@@ -142,7 +142,9 @@ async def delete(self, key: str) -> None:
142142 with self .log ():
143143 return await self ._store .delete (key = key )
144144
145- async def set_partial_values (self , key_start_values : list [tuple [str , int , bytes ]]) -> None :
145+ async def set_partial_values (
146+ self , key_start_values : Iterable [tuple [str , int , bytes | bytearray | memoryview ]]
147+ ) -> None :
146148 with self .log ():
147149 return await self ._store .set_partial_values (key_start_values = key_start_values )
148150
0 commit comments