api/modules: remove redundant localModules

This commit is contained in:
Johannes Kirschbauer
2025-07-13 11:52:13 +02:00
parent 38eb690bc5
commit 5f19e76cd0
4 changed files with 7 additions and 16 deletions

View File

@@ -154,22 +154,19 @@ class ModuleInfo(TypedDict):
roles: dict[str, None]
class ModuleLists(TypedDict):
modulesPerSource: dict[str, dict[str, ModuleInfo]]
localModules: dict[str, ModuleInfo]
class ModuleList(TypedDict):
modules: dict[str, dict[str, ModuleInfo]]
@API.register
def list_modules(base_path: str) -> ModuleLists:
def list_modules(base_path: str) -> ModuleList:
"""
Show information about a module
"""
flake = Flake(base_path)
modules = flake.select(
"clanInternals.inventoryClass.{?modulesPerSource,?localModules}"
)
modules = flake.select("clanInternals.inventoryClass.modulesPerSource")
return modules
return ModuleList({"modules": modules})
@dataclass