doc generation bugfixes

This commit is contained in:
Eriks K 2020-09-21 11:34:50 +03:00
parent 7fadeb1a49
commit 48b5e473aa
3 changed files with 5 additions and 5 deletions

View File

@ -12,8 +12,8 @@ __all__ = ['SlowRequests', 'CitizenAPI']
class SlowRequests(Session): class SlowRequests(Session):
last_time: datetime.datetime last_time: datetime.datetime
timeout = datetime.timedelta(milliseconds=500) timeout: datetime.timedelta = datetime.timedelta(milliseconds=500)
uas = [ uas: List[str] = [
# Chrome # 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/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 '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:79.0) Gecko/20100101 Firefox/79.0',
'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0', 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0',
] ]
debug = False debug: bool = False
def __init__(self): def __init__(self):
super().__init__() super().__init__()

View File

@ -1615,7 +1615,7 @@ class CitizenMilitary(CitizenTravel):
:param battle: Battle battle to fight in :param battle: Battle battle to fight in
:type battle: Battle :type battle: Battle
:param side: BattleSide or None. Battle side to fight in, If side not == invader id or not in invader deployed :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 :type side: BattleSide
:param count: How many hits to do, if not specified self.should_fight() is called. :param count: How many hits to do, if not specified self.should_fight() is called.
:type count: int :type count: int

View File

@ -629,7 +629,7 @@ class Reporter:
except: # noqa except: # noqa
return [] return []
def fetch_tasks(self) -> List[str, Tuple[Any]]: def fetch_tasks(self) -> List[Union[str, Tuple[Any]]]:
try: try:
task_response = self._req.get(f'{self.url}/api/v1/command', task_response = self._req.get(f'{self.url}/api/v1/command',
params=dict(citizen=self.citizen_id, key=self.key)) params=dict(citizen=self.citizen_id, key=self.key))