From 6fff9018560b8300d655338cc7f845f4bce25336 Mon Sep 17 00:00:00 2001 From: "OpenGenesis (MPL 2.0)" <153564363+opengenesislink@users.noreply.github.com> Date: Sun, 8 Nov 2026 18:36:28 +0100 Subject: [PATCH] ci(config): normalize legacy Nini tabs before strict Python config comparison --- tools/ci/verify_g1_config_contract.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/ci/verify_g1_config_contract.py b/tools/ci/verify_g1_config_contract.py index d086a21c..d52af9cd 100644 --- a/tools/ci/verify_g1_config_contract.py +++ b/tools/ci/verify_g1_config_contract.py @@ -23,7 +23,10 @@ def text(path: str) -> str: def parse(path: str) -> ConfigParser: config = ConfigParser(interpolation=None, strict=True) config.optionxform = str - config.read_string(text(path), source=path) + # Nini's OpenSimDefaults.ini contains legacy tab-indented keys. + # ConfigParser treats following four-space keys as multiline values unless + # their indentation is normalized. The actual INI is left untouched. + config.read_string(text(path).expandtabs(4), source=path) return config @@ -101,9 +104,7 @@ for section in ( effective = lambda value: value.partition(";")[0].strip().strip('"').lower() assert effective(sim.get(section, key)) == effective( defaults.get(section, key) - ), (f"Unexpected default override: [{section}] {key}: " - f"active={effective(sim.get(section, key))!r}, " - f"default={effective(defaults.get(section, key))!r}") + ), f"Unexpected default override: [{section}] {key}" assert sim.get("Startup", "physics") == "BulletSim" assert sim.get("Startup", "meshing") == "Meshmerizer"