Skip to content

Commit 694af4b

Browse files
Make methods of abstract base class async
The goal is that the async methods of child classes match the signatures of the methods of the abstract base class.
1 parent 1131253 commit 694af4b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/zarr/abc/store.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,17 +329,17 @@ def supports_listing(self) -> bool:
329329
...
330330

331331
@abstractmethod
332-
def list(self) -> AsyncGenerator[str, None]:
332+
async def list(self) -> AsyncGenerator[str, None]:
333333
"""Retrieve all keys in the store.
334334
335335
Returns
336336
-------
337337
AsyncGenerator[str, None]
338338
"""
339-
...
339+
yield # type: ignore[misc]
340340

341341
@abstractmethod
342-
def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
342+
async def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
343343
"""
344344
Retrieve all keys in the store that begin with a given prefix. Keys are returned with the
345345
common leading prefix removed.
@@ -352,10 +352,10 @@ def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
352352
-------
353353
AsyncGenerator[str, None]
354354
"""
355-
...
355+
yield # type: ignore[misc]
356356

357357
@abstractmethod
358-
def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
358+
async def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
359359
"""
360360
Retrieve all keys and prefixes with a given prefix and which do not contain the character
361361
“/” after the given prefix.
@@ -368,7 +368,7 @@ def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
368368
-------
369369
AsyncGenerator[str, None]
370370
"""
371-
...
371+
yield # type: ignore[misc]
372372

373373
def close(self) -> None:
374374
"""Close the store."""

0 commit comments

Comments
 (0)