From 48b5e473aae9f45471786360c7f1a9adb33d652d Mon Sep 17 00:00:00 2001 From: Eriks K Date: Mon, 21 Sep 2020 11:34:50 +0300 Subject: [PATCH] doc generation bugfixes --- erepublik/access_points.py | 6 +++--- erepublik/citizen.py | 2 +- erepublik/classes.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erepublik/access_points.py b/erepublik/access_points.py index 2ba746a..5fa4aeb 100644 --- a/erepublik/access_points.py +++ b/erepublik/access_points.py @@ -12,8 +12,8 @@ __all__ = ['SlowRequests', 'CitizenAPI'] class SlowRequests(Session): last_time: datetime.datetime - timeout = datetime.timedelta(milliseconds=500) - uas = [ + timeout: datetime.timedelta = datetime.timedelta(milliseconds=500) + uas: List[str] = [ # Chrome 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36', # noqa 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36', # noqa @@ -36,7 +36,7 @@ class SlowRequests(Session): 'Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0', 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0', ] - debug = False + debug: bool = False def __init__(self): super().__init__() diff --git a/erepublik/citizen.py b/erepublik/citizen.py index 0c47201..334fe98 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -1615,7 +1615,7 @@ class CitizenMilitary(CitizenTravel): :param battle: Battle battle to fight in :type battle: Battle :param side: BattleSide or None. Battle side to fight in, If side not == invader id or not in invader deployed - allies list, then defender's side is chosen + allies list, then defender's side is chosen :type side: BattleSide :param count: How many hits to do, if not specified self.should_fight() is called. :type count: int diff --git a/erepublik/classes.py b/erepublik/classes.py index fb37a00..7db9afa 100644 --- a/erepublik/classes.py +++ b/erepublik/classes.py @@ -629,7 +629,7 @@ class Reporter: except: # noqa return [] - def fetch_tasks(self) -> List[str, Tuple[Any]]: + def fetch_tasks(self) -> List[Union[str, Tuple[Any]]]: try: task_response = self._req.get(f'{self.url}/api/v1/command', params=dict(citizen=self.citizen_id, key=self.key))