Skip to content

storage: origin_visit_add: Type and make origin_visit_add return an OriginVisit object

origin_visit_add: Adapt endpoint signature to return OriginVisit

Prior to this commit, there was:

  • no signature in the method
  • discrepancy between checks on the different backend

origin_visit_add endpoint is now typed

def origin_visit_add(
    self, origin_url: str,
    date: Union[str, datetime.datetime], type: str) -> OriginVisit:

This also:

  • renames appropriately the origin_url parameter (removing 1 FIXME)
  • align backend implementations' check which were different

Impacts:

Test Plan

tox


Migrated from D2820 (view on Phabricator)

Merge request reports

Loading