From 1ffc4f89cac9f2c55a2360164de466633c45759c Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:38:13 +0200 Subject: [PATCH] refactor: registry merge is fully flexible, no hardcoded lists --- scripts/common.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/common.py b/scripts/common.py index f3ed4b10..9a03f7dc 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -215,15 +215,11 @@ def load_platform_config(platform_name: str, platforms_dir: str = "platforms") - elif isinstance(reg_cores, list) and cfg_cores is None: config["cores"] = reg_cores - # Merge all registry fields not already in config. - # Skip registry-only metadata (not relevant to platform config). - _REGISTRY_ONLY = { - "config", "status", "logo", "scraper", "source_url", - "source_format", "schedule", "target_scraper", "target_source", - "inherits_from", "install", "cores", # cores handled above - } + # Merge all registry fields absent from config (except cores, + # handled above with union logic). No hardcoded list — any field + # added to the registry is automatically available in the config. for key, val in reg_entry.items(): - if key not in _REGISTRY_ONLY and key not in config: + if key != "cores" and key not in config: config[key] = val _platform_config_cache[cache_key] = config