Answer architecture round 1: 1 🔴, 2 🟡; split the filter's pure core out of main, stage settings.json before Update's move, read the stored settings in a repo check

This commit is contained in:
2026-10-21 21:38:50 +02:00
parent 7c3800337a
commit 7665087e1e
6 changed files with 54 additions and 27 deletions
+8 -4
View File
@@ -9,11 +9,15 @@ import json
import sys
def main() -> None:
settings = json.load(sys.stdin)
def cleaned(written: str) -> str:
"""settings.json as git stores it: without "model", every key sorted."""
settings = json.loads(written)
settings.pop("model", None)
json.dump(settings, sys.stdout, ensure_ascii=False, indent=2, sort_keys=True)
sys.stdout.write("\n")
return json.dumps(settings, ensure_ascii=False, indent=2, sort_keys=True) + "\n"
def main() -> None:
sys.stdout.write(cleaned(sys.stdin.read()))
if __name__ == "__main__":