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:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user