cgit lister: Add missing types on the init method
Related to T2984
This commit is contained in:
parent
ea8ecee541
commit
d62e77c1b4
2 changed files with 5 additions and 1 deletions
|
@ -35,7 +35,9 @@ class CGitLister(StatelessLister[Repositories]):
|
|||
|
||||
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 @@ class CGitLister(StatelessLister[Repositories]):
|
|||
"""
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue