Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124287
D6282.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
505 B
Subscribers
None
D6282.diff
View Options
diff --git a/swh/model/model.py b/swh/model/model.py
--- a/swh/model/model.py
+++ b/swh/model/model.py
@@ -121,6 +121,8 @@
__slots__ = ()
+ id: Sha1Git
+
@abstractmethod
def compute_hash(self) -> bytes:
"""Derived model classes must implement this to compute
@@ -137,7 +139,7 @@
object.__setattr__(self, "id", obj_id)
def unique_key(self) -> KeyType:
- return self.id # type: ignore
+ return self.id
@attr.s(frozen=True, slots=True)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 4:37 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3224847
Attached To
D6282: HashableObject: Add type annotation for 'id' attribute
Event Timeline
Log In to Comment