Verified Commit 13f5d595 authored by Frede Hundewadt's avatar Frede Hundewadt
Browse files

added hints

parent cd7944ab
......@@ -30,8 +30,8 @@ class Mirror:
self.country_pool = []
self.mirror_pool = []
def add(self, country, url, protocols,
branches=None, last_sync=None, resp_time=None):
def add(self, country: str, url: str, protocols: list,
branches: list=None, last_sync: str = None, resp_time: str = None) -> None:
"""Append mirror
:param country:
:param url:
......@@ -40,12 +40,12 @@ class Mirror:
:param last_sync: optional from status.json
:param resp_time: optional from status.json
"""
if branches is None:
branches = [-1, -1, -1]
if last_sync is None:
last_sync = "00:00"
if resp_time is None:
resp_time = "00.00"
if branches is None:
branches = [-1, -1, -1]
if country not in self.country_pool:
self.country_pool.append(country)
# translate negative integer in status.json
......@@ -64,7 +64,7 @@ class Mirror:
}
self.mirror_pool.append(mirror)
def seed(self, servers, status=False, custom=False):
def seed(self, servers: list, status: bool = False, custom: bool = False) -> None:
"""
Seed mirrorlist
:param servers:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment