From 7ef6c17fa18eb6cc0c7aba96e2f495330847ed0a Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 6 Apr 2021 14:38:07 +0100 Subject: [PATCH] inara: Fix 'fleet' type --- plugins/inara.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/inara.py b/plugins/inara.py index c9a6d9e1..98937069 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -747,8 +747,8 @@ def journal_entry( # noqa: C901, CCR001 # Fleet if event_name == 'StoredShips': - fleet = sorted( - [{ + fleet: List[OrderedDictT[str, Any]] = sorted( + [OrderedDict({ 'shipType': x['ShipType'], 'shipGameID': x['ShipID'], 'shipName': x.get('Name'), @@ -756,15 +756,15 @@ def journal_entry( # noqa: C901, CCR001 'starsystemName': entry['StarSystem'], 'stationName': entry['StationName'], 'marketID': entry['MarketID'], - } for x in entry['ShipsHere']] + - [{ + }) for x in entry['ShipsHere']] + + [OrderedDict({ 'shipType': x['ShipType'], 'shipGameID': x['ShipID'], 'shipName': x.get('Name'), 'isHot': x['Hot'], 'starsystemName': x.get('StarSystem'), # Not present for ships in transit 'marketID': x.get('ShipMarketID'), # " - } for x in entry['ShipsRemote']], + }) for x in entry['ShipsRemote']], key=itemgetter('shipGameID') )