Mod, QMod: return empty list instead of nothing when there's no author

This commit is contained in:
Toast 2025-06-05 12:11:56 +02:00
parent a757e31cee
commit d5ebb6dba4
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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")