diff --git a/bauh/api/abstract/controller.py b/bauh/api/abstract/controller.py index dde6334e..dd3e3e5e 100644 --- a/bauh/api/abstract/controller.py +++ b/bauh/api/abstract/controller.py @@ -360,8 +360,7 @@ class SoftwareManager(ABC): """ pass - @abstractmethod - def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSuggestion]: + def list_suggestions(self, limit: int, filter_installed: bool) -> Optional[List[PackageSuggestion]]: """ :param limit: max suggestions to be returned. If limit < 0, it should not be considered :param filter_installed: if the installed suggestions should not be retrieved diff --git a/bauh/gems/appimage/controller.py b/bauh/gems/appimage/controller.py index e2ec91c6..bf1775ea 100644 --- a/bauh/gems/appimage/controller.py +++ b/bauh/gems/appimage/controller.py @@ -767,7 +767,7 @@ class AppImageManager(SoftwareManager, SettingsController): if not dbfiles or len({f for f in (DATABASE_APPS_FILE, DATABASE_RELEASES_FILE) if f in dbfiles}) != 2: return [self.i18n['appimage.warning.missing_db_files'].format(appimage=bold('AppImage'))] - def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSuggestion]: + def list_suggestions(self, limit: int, filter_installed: bool) -> Optional[List[PackageSuggestion]]: res = [] connection = self._get_db_connection(DATABASE_APPS_FILE) diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index e0cacde7..abe3a6d2 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -2797,7 +2797,7 @@ class ArchManager(SoftwareManager, SettingsController): if not git.is_installed(): return [self.i18n['arch.warning.aur_missing_dep'].format(bold('git'))] - def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSuggestion]: + def list_suggestions(self, limit: int, filter_installed: bool) -> Optional[List[PackageSuggestion]]: self.logger.info("Downloading suggestions file {}".format(SUGGESTIONS_FILE)) file = self.http_client.get(SUGGESTIONS_FILE) diff --git a/bauh/gems/debian/controller.py b/bauh/gems/debian/controller.py index 183e4995..9abaa7f9 100644 --- a/bauh/gems/debian/controller.py +++ b/bauh/gems/debian/controller.py @@ -521,7 +521,7 @@ class DebianPackageManager(SoftwareManager, SettingsController): if suggestions: output.update(suggestions) - def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSuggestion]: + def list_suggestions(self, limit: int, filter_installed: bool) -> Optional[List[PackageSuggestion]]: name_priority = dict() fill_suggestions = Thread(target=self._fill_suggestions, args=(name_priority,)) diff --git a/bauh/gems/flatpak/controller.py b/bauh/gems/flatpak/controller.py index 38586355..0921ba48 100644 --- a/bauh/gems/flatpak/controller.py +++ b/bauh/gems/flatpak/controller.py @@ -537,7 +537,7 @@ class FlatpakManager(SoftwareManager, SettingsController): def list_warnings(self, internet_available: bool) -> Optional[List[str]]: pass - def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSuggestion]: + def list_suggestions(self, limit: int, filter_installed: bool) -> Optional[List[PackageSuggestion]]: cli_version = flatpak.get_version() res = [] diff --git a/bauh/gems/snap/controller.py b/bauh/gems/snap/controller.py index 29975889..df7d9236 100644 --- a/bauh/gems/snap/controller.py +++ b/bauh/gems/snap/controller.py @@ -361,7 +361,7 @@ class SnapManager(SoftwareManager, SettingsController): app.status = PackageStatus.READY return app - def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSuggestion]: + def list_suggestions(self, limit: int, filter_installed: bool) -> Optional[List[PackageSuggestion]]: res = [] if snapd.is_running(): diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index 4aed86cd..9018acde 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -1023,7 +1023,7 @@ class WebApplicationManager(SoftwareManager, SettingsController): def _fill_config_async(self, output: dict): output.update(self.configman.get_config()) - def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSuggestion]: + def list_suggestions(self, limit: int, filter_installed: bool) -> Optional[List[PackageSuggestion]]: web_config = {} thread_config = Thread(target=self._fill_config_async, args=(web_config,))