refactor: name the profile kinds in model.profiles

lists_files(profile) answers whether a profile declares files, false
for a launcher or an alias, and is_emulator(profile) whether it counts as
an emulator, false for an alias or a test core. Eighteen inline checks in
model, resolve and packs read them; each keeps the set it tested.
model.systems keeps its own check: it sits below model.profiles. No
behavior change.
This commit is contained in:
Abdessamad Derraz committed 2026-11-20 20:03:26 +01:00
1 parent b679edb133
commit 899f591575
13 files changed
+46 -25

No files matched your search

+2 -1
View File
@@ -30,6 +30,7 @@ rank: the second core reads it by its own rule, which no rank expresses.
from __future__ import annotations
from model.alternatives import set_keys
from model.profiles import lists_files
BIOS_CATEGORY = "bios"
@@ -69,7 +70,7 @@ def slot_claims(profiles: dict) -> dict[str, dict[str, dict]]:
"""
claims: dict[str, dict[str, dict]] = {}
for emu_name, profile in sorted(profiles.items()):
if profile.get("type") in ("launcher", "alias"):
if not lists_files(profile):
continue
for f in profile.get("files") or []:
if not isinstance(f, dict):