Skip to content

Commit

Permalink
Make methods of abstract base class async
Browse files Browse the repository at this point in the history
The goal is that the async methods of child classes match the signatures
of the methods of the abstract base class.
  • Loading branch information
DimitriPapadopoulos committed Oct 17, 2024
1 parent 85c9b5f commit f2d2683
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/zarr/abc/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def supports_listing(self) -> bool:
...

@abstractmethod
def list(self) -> AsyncGenerator[str, None]:
async def list(self) -> AsyncGenerator[str, None]:
"""Retrieve all keys in the store.
Returns
Expand All @@ -339,7 +339,7 @@ def list(self) -> AsyncGenerator[str, None]:
...

@abstractmethod
def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
async def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
"""
Retrieve all keys in the store that begin with a given prefix. Keys are returned with the
common leading prefix removed.
Expand All @@ -355,7 +355,7 @@ def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
...

@abstractmethod
def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
async def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
"""
Retrieve all keys and prefixes with a given prefix and which do not contain the character
“/” after the given prefix.
Expand Down

0 comments on commit f2d2683

Please sign in to comment.