Skip to content

Commit 255c942

Browse files
committed
Updated example.
1 parent 85176fa commit 255c942

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

examples/completion_item_choices.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ def __init__(self, account_id: int, owner: str):
5454
self.account_id = account_id
5555
self.owner = owner
5656

57+
def __eq__(self, other: object) -> bool:
58+
if isinstance(other, Account):
59+
return self.account_id == other.account_id
60+
return False
61+
62+
def __hash__(self) -> int:
63+
return hash(self.account_id)
64+
5765
def __repr__(self) -> str:
5866
return f"Account(id={self.account_id}, owner='{self.owner}')"
5967

0 commit comments

Comments
 (0)