From 4b1f49ac22221bd40ceae9161e4c475769aa90a1 Mon Sep 17 00:00:00 2001
From: Franck Bret <franck.bret@octobus.net>
Date: Mon, 18 Dec 2023 12:02:46 +0100
Subject: [PATCH] Adapt and rebase

'url' and 'instance' are mandatory
Add elm lister entry to pyproject.toml
---
 pyproject.toml           | 1 +
 swh/lister/elm/lister.py | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index ca232d1f..672e40b9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -40,6 +40,7 @@ testing = {file = ["requirements-test.txt"]}
 "swh.lister.crates" = "swh.lister.crates:register"
 "swh.lister.debian" = "swh.lister.debian:register"
 "swh.lister.dlang" = "swh.lister.dlang:register"
+"swh.lister.elm" = "swh.lister.elm:register"
 "swh.lister.gitea" = "swh.lister.gitea:register"
 "swh.lister.github" = "swh.lister.github:register"
 "swh.lister.gitiles" = "swh.lister.gitiles:register"
diff --git a/swh/lister/elm/lister.py b/swh/lister/elm/lister.py
index 83a1b84e..545aad8a 100644
--- a/swh/lister/elm/lister.py
+++ b/swh/lister/elm/lister.py
@@ -32,6 +32,8 @@ class ElmLister(StatelessLister[ElmListerPage]):
         self,
         scheduler: SchedulerInterface,
         credentials: Optional[CredentialsType] = None,
+        url: str = SEARCH_URL,
+        instance: str = INSTANCE,
         max_origins_per_page: Optional[int] = None,
         max_pages: Optional[int] = None,
         enable_origins: bool = True,
@@ -39,8 +41,8 @@ class ElmLister(StatelessLister[ElmListerPage]):
         super().__init__(
             scheduler=scheduler,
             credentials=credentials,
-            instance=self.INSTANCE,
-            url=self.SEARCH_URL,
+            url=url,
+            instance=instance,
             max_origins_per_page=max_origins_per_page,
             max_pages=max_pages,
             enable_origins=enable_origins,
-- 
GitLab