Skip to content
Snippets Groups Projects

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading