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)