Skip to content

Commit

Permalink
LocalStore__eq__ #1744
Browse files Browse the repository at this point in the history
Fix equality comparison in LocalStore class by implementing __eq__ method
  • Loading branch information
Charoula-Kyriakides authored Apr 13, 2024
1 parent 777c5ff commit 932329f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/zarr/v3/store/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ def __str__(self) -> str:
def __repr__(self) -> str:
return f"LocalStore({repr(str(self))})"

def __eq__(self, other: 'LocalStore') -> bool:
return isinstance(other, type(self)) and self.root == other.root

async def get(
self, key: str, byte_range: Optional[Tuple[int, Optional[int]]] = None
) -> Optional[bytes]:
Expand Down

0 comments on commit 932329f

Please sign in to comment.