From 0601fd5ebb41d2e52a1cbc7794365bd7880a4ac9 Mon Sep 17 00:00:00 2001 From: GeoffreyCoulaud Date: Wed, 19 Jul 2023 05:32:47 +0200 Subject: [PATCH] Converted genexps to setcomps --- src/importer/sources/heroic_source.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/importer/sources/heroic_source.py b/src/importer/sources/heroic_source.py index cedfcd7..b3ad604 100644 --- a/src/importer/sources/heroic_source.py +++ b/src/importer/sources/heroic_source.py @@ -241,11 +241,11 @@ class GogIterable(StoreSubSource): def get_installed_app_names(self): try: - return ( + return { app_name for entry in path_json_load(self.installed_path)["installed"] if (app_name := entry.get("appName")) is not None - ) + } except (OSError, JSONDecodeError, KeyError, AttributeError) as error: raise InvalidInstalledFileError( f"Invalid {self.installed_path.name}" @@ -261,11 +261,11 @@ class NileIterable(StoreSubSource): def get_installed_app_names(self): try: installed_json = path_json_load(self.installed_path) - return ( + return { app_name for entry in installed_json if (app_name := entry.get("id")) is not None - ) + } except (OSError, JSONDecodeError, AttributeError) as error: raise InvalidInstalledFileError( f"Invalid {self.installed_path.name}"