Skip to content

Commit 17014c7

Browse files
committed
Fix : GemVersion TypeError unhashable type: 'list'
Signed-off-by: ziadhany <ziadhany2016@gmail.com>
1 parent a8ec2e7 commit 17014c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/univers/gem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def equal_strictly(self, other):
225225
return self.version == other.version
226226

227227
def __hash__(self):
228-
return hash(self.canonical_segments)
228+
return hash(tuple(self.canonical_segments))
229229

230230
def __eq__(self, other):
231231
return self.canonical_segments == other.canonical_segments
@@ -321,7 +321,7 @@ def get_segments(self):
321321
def canonical_segments(self):
322322
if not self._canonical_segments:
323323
self._canonical_segments = self.get_canonical_segments()
324-
return list(self._canonical_segments)
324+
return tuple(self._canonical_segments)
325325

326326
def get_canonical_segments(self):
327327
"""

0 commit comments

Comments
 (0)