Skip to content

Commit e0d458c

Browse files
author
Val Brodsky
committed
Add hash function to task
1 parent a23aabc commit e0d458c

File tree

1 file changed

+3
-0
lines changed
  • libs/labelbox/src/labelbox/schema

1 file changed

+3
-0
lines changed

libs/labelbox/src/labelbox/schema/task.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def __eq__(self, task):
5959
return isinstance(
6060
task, Task) and task.uid == self.uid and task.type == self.type
6161

62+
def __hash__(self):
63+
return hash(self.uid)
64+
6265
# Import and upsert have several instances of special casing
6366
def is_creation_task(self) -> bool:
6467
return self.name == 'JSON Import' or self.type == 'adv-upsert-data-rows'

0 commit comments

Comments
 (0)