From bea9d6d147e42e8a076431fd50f190c2ef14ba90 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" Date: Mon, 25 Jan 2021 18:55:25 +0100 Subject: [PATCH] gitlab: make url mandatory and add type --- swh/lister/gitlab/lister.py | 2 +- swh/lister/tests/test_cli.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/swh/lister/gitlab/lister.py b/swh/lister/gitlab/lister.py index a26185e..1540e66 100644 --- a/swh/lister/gitlab/lister.py +++ b/swh/lister/gitlab/lister.py @@ -93,7 +93,7 @@ class GitLabLister(Lister[GitLabListerState, PageResult]): def __init__( self, scheduler, - url=None, + url: str, instance: Optional[str] = None, credentials: Optional[CredentialsType] = None, incremental: bool = False, diff --git a/swh/lister/tests/test_cli.py b/swh/lister/tests/test_cli.py index 0d674e6..79e09ac 100644 --- a/swh/lister/tests/test_cli.py +++ b/swh/lister/tests/test_cli.py @@ -17,6 +17,7 @@ lister_args = { "api_token": "bogus", }, "gitea": {"url": "https://try.gitea.io/api/v1/",}, + "gitlab": {"url": "https://gitlab.ow2.org/api/v4", "instance": "ow2",}, }