Page MenuHomeSoftware Heritage
Paste P1014

(An Untitled Masterwork)
ActivePublic

Authored by douardda on Apr 22 2021, 5:37 PM.
In [1]: from swh.storage.tests import storage_data as sd
In [2]: set(sd.StorageData.git_revisions)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-45b8523ac10c> in <module>
----> 1 set(sd.StorageData.git_revisions)
<attrs generated hash swh.model.model.Revision> in __hash__(self)
1 def __hash__(self):
----> 2 return hash((
3 2836558187653566397,
4 self.message,
5 self.author,
~/swh/swh-environment/swh-model/swh/model/collections.py in __hash__(self)
47
48 def __hash__(self):
---> 49 return hash(tuple(sorted(self.data)))
50
51 def copy_pop(self, popped_key) -> Tuple[Optional[VT], "ImmutableDict[KT, VT]"]:
TypeError: unhashable type: 'dict'