1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-30 15:19:40 +03:00

companion: Optional[bool], not Union & minor if formatting

This commit is contained in:
Athanasius 2021-08-25 13:48:32 +01:00
parent a48c33eda8
commit 6089dc6b0e
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -629,7 +629,7 @@ class Session(object):
self.session.headers['User-Agent'] = USER_AGENT
self.state = Session.STATE_OK
def login(self, cmdr: str = None, is_beta: Union[None, bool] = None) -> bool:
def login(self, cmdr: str = None, is_beta: Optional[bool] = None) -> bool:
"""
Attempt oAuth2 login.
@ -830,8 +830,10 @@ class Session(object):
logger.error("No lastStarport in data!")
return station_data
if ((last_starport_name := last_starport.get('name')) is None
or last_starport_name == ''):
if (
(last_starport_name := last_starport.get('name')) is None
or last_starport_name == ''
):
# This could well be valid if you've been out exploring for a long
# time.
logger.warning("No lastStarport name!")