Skip to content

Commit 00c4502

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 4c3081c commit 00c4502

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
@@ -330,17 +330,17 @@ def supports_listing(self) -> bool:
330330
...
331331

332332
@abstractmethod
333-
def list(self) -> AsyncGenerator[str, None]:
333+
async def list(self) -> AsyncGenerator[str, None]:
334334
"""Retrieve all keys in the store.
335335
336336
Returns
337337
-------
338338
AsyncGenerator[str, None]
339339
"""
340-
...
340+
yield ""
341341

342342
@abstractmethod
343-
def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
343+
async def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
344344
"""
345345
Retrieve all keys in the store that begin with a given prefix. Keys are returned with the
346346
common leading prefix removed.
@@ -353,10 +353,10 @@ def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
353353
-------
354354
AsyncGenerator[str, None]
355355
"""
356-
...
356+
yield ""
357357

358358
@abstractmethod
359-
def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
359+
async def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
360360
"""
361361
Retrieve all keys and prefixes with a given prefix and which do not contain the character
362362
“/” after the given prefix.
@@ -369,7 +369,7 @@ def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
369369
-------
370370
AsyncGenerator[str, None]
371371
"""
372-
...
372+
yield ""
373373

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

0 commit comments

Comments
 (0)