Staging instance, all changes can be removed at any time

Skip to content

Add ContentId and TotalContentId types

This MR comes with 3 revisions: the first one is adding said ContentId (TypedDict) type to handle #4641; The other 2 are (more or less) related to this: using said new ContentId as return signature for the BaseContent.hashes() method, and simplify a bit the MultiHash (get rid of the special-case-handling of the content length as an optional hash).

Closes #4641

Note that:

  • these changes will make mypy unhappy with swh.storage current version (1.11.0). A fix for this issue is proposed as MR swh-storage!1043 (merged)
  • some work will be needed in swh.storage and swh.objstorage once this s pusblished in swh.model v7 (see #4641)

Merge request reports

Loading