Skip to content

Commit 52e66c9

Browse files
Make methods of abstract base class async
The rationale is that the methods of child classes should match the signatures of the methods of the abstract base class, including async.
1 parent 1131253 commit 52e66c9

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 ""
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 ""
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 ""
372372

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

0 commit comments

Comments
 (0)