diff --git a/swh/lister/cgit/lister.py b/swh/lister/cgit/lister.py --- a/swh/lister/cgit/lister.py +++ b/swh/lister/cgit/lister.py @@ -35,7 +35,9 @@ LISTER_NAME = "cgit" - def __init__(self, scheduler: SchedulerInterface, url=None, instance=None): + def __init__( + self, scheduler: SchedulerInterface, url: str, instance: Optional[str] = None + ): """Lister class for CGit repositories. Args: @@ -47,6 +49,7 @@ """ if not instance: instance = urlparse(url).hostname + assert instance is not None # Make mypy happy super().__init__( scheduler=scheduler, credentials=None, url=url, instance=instance,