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

No need for [] if it's a generator inside all() anyway.

This commit is contained in:
Athanasius 2021-06-10 14:04:38 +01:00
parent 9fa02b51c3
commit a7722f70fe
2 changed files with 2 additions and 2 deletions

View File

@ -853,7 +853,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
# written to a separate shiplocker.json file - other updates will just update that file and mention it
# has changed with an empty shiplocker event in the main journal.
if not all([entry.get(t, False) for t in ('Components', 'Consumables', 'Data', 'Items')]):
if not all(entry.get(t, False) for t in ('Components', 'Consumables', 'Data', 'Items')):
logger.debug('ShipLocker event is an empty one (at least missing one data type')
# So attempt to load data from the most recent file instead
currentdir_path = pathlib.Path(str(self.currentdir))

View File

@ -1101,7 +1101,7 @@ def journal_entry( # noqa: C901, CCR001
elif event_name == 'ShipLocker':
# In ED 4.0.0.400 the event is only full sometimes, other times indicating
# ShipLocker.json was written.
if not all([entry.get(t, False) for t in ('Components', 'Consumables', 'Data', 'Items')]):
if not all(entry.get(t, False) for t in ('Components', 'Consumables', 'Data', 'Items')):
# So it's an empty event, core EDMC should have stuffed the data
# into state['ShipLockerJSON'].
entry = state['ShipLockerJSON']