1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Adjust return type of companion.session.station()

Now we're correctly always returning `data` it can't be None.
This commit is contained in:
Athanasius 2020-09-18 12:58:16 +01:00
parent be541571d9
commit 030ae05889

View File

@ -530,7 +530,7 @@ class Session(object):
"""Perform general CAPI /profile endpoint query."""
return self.query(URL_QUERY)
def station(self) -> Union[CAPIData, None]:
def station(self) -> CAPIData:
"""Perform CAPI /profile endpoint query for station data."""
data = self.query(URL_QUERY)
if not data['commander'].get('docked'):