1616from zarr .core .config import config
1717
1818if TYPE_CHECKING :
19- from collections .abc import AsyncGenerator , Coroutine , Iterable
19+ from collections .abc import AsyncGenerator , Coroutine , Iterable , Sequence
2020 from typing import Any
2121
2222 from obstore import ListResult , ListStream , ObjectMeta , OffsetRange , SuffixRange
@@ -216,26 +216,26 @@ def list(self) -> AsyncGenerator[str, None]:
216216 # docstring inherited
217217 import obstore as obs
218218
219- objects : ListStream [list [ObjectMeta ]] = obs .list (self .store )
219+ objects : ListStream [Sequence [ObjectMeta ]] = obs .list (self .store ) # type: ignore[type-var, assignment]
220220 return _transform_list (objects )
221221
222222 def list_prefix (self , prefix : str ) -> AsyncGenerator [str , None ]:
223223 # docstring inherited
224224 import obstore as obs
225225
226- objects : ListStream [list [ObjectMeta ]] = obs .list (self .store , prefix = prefix )
226+ objects : ListStream [Sequence [ObjectMeta ]] = obs .list (self .store , prefix = prefix ) # type: ignore[assignment, type-var]
227227 return _transform_list (objects )
228228
229229 def list_dir (self , prefix : str ) -> AsyncGenerator [str , None ]:
230230 # docstring inherited
231231 import obstore as obs
232232
233233 coroutine = obs .list_with_delimiter_async (self .store , prefix = prefix )
234- return _transform_list_dir (coroutine , prefix )
234+ return _transform_list_dir (coroutine , prefix ) # type: ignore[arg-type]
235235
236236
237237async def _transform_list (
238- list_stream : ListStream [list [ObjectMeta ]],
238+ list_stream : ListStream [Sequence [ObjectMeta ]], # type: ignore[type-var]
239239) -> AsyncGenerator [str , None ]:
240240 """
241241 Transform the result of list into an async generator of paths.
@@ -246,7 +246,8 @@ async def _transform_list(
246246
247247
248248async def _transform_list_dir (
249- list_result_coroutine : Coroutine [Any , Any , ListResult [list [ObjectMeta ]]], prefix : str
249+ list_result_coroutine : Coroutine [Any , Any , ListResult [Sequence [ObjectMeta ]]], # type: ignore[type-var]
250+ prefix : str ,
250251) -> AsyncGenerator [str , None ]:
251252 """
252253 Transform the result of list_with_delimiter into an async generator of paths.
0 commit comments