From d5ebb6dba4d58e652cba1f60d05708f2e6f1d9ef Mon Sep 17 00:00:00 2001 From: Toast Date: Thu, 5 Jun 2025 12:11:56 +0200 Subject: [PATCH] Mod, QMod: return empty list instead of nothing when there's no author --- src/leek/mod.py | 4 ++-- src/leek/qmod.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/leek/mod.py b/src/leek/mod.py index b03afb7..bc87efb 100644 --- a/src/leek/mod.py +++ b/src/leek/mod.py @@ -48,12 +48,12 @@ class Mod: return None @property - def authors(self) -> list[str] | None: + def authors(self) -> list[str]: if self.__has_meta_json: if "authors" in self.__meta: return self.__meta.get("authors", list[str]) if "author" not in self.__config: - return None + return [] return [self.__config.get("author", str)] @property diff --git a/src/leek/qmod.py b/src/leek/qmod.py index 1e12bc4..8b77232 100644 --- a/src/leek/qmod.py +++ b/src/leek/qmod.py @@ -41,7 +41,7 @@ class QMod(QObject): return self.__mod.long_description @Property(list, constant=True) - def authors(self) -> list[str] | None: + def authors(self) -> list[str]: return self.__mod.authors mod_enabled = Signal(name="enabled")