From 026458aaac18c616b1bee68c9b6eb46e3772f29f Mon Sep 17 00:00:00 2001 From: Tab Atkins-Bittner Date: Thu, 14 Dec 2023 15:10:49 -0800 Subject: [PATCH] Indent/sort the JSON for readability and stability --- bikeshed/stylescript/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bikeshed/stylescript/manager.py b/bikeshed/stylescript/manager.py index baef2d83fa..0036ea82db 100644 --- a/bikeshed/stylescript/manager.py +++ b/bikeshed/stylescript/manager.py @@ -108,7 +108,7 @@ def toElement(self) -> t.ElementT: text = f"/* Boilerplate: script-{self.name} */\n" if self.data: for dataName, dataJSON in self.data.items(): - text += f"let {dataName} = {json.dumps(dataJSON)};\n" + text += f"let {dataName} = {json.dumps(dataJSON, sort_keys=True, indent=1)};\n" text += "\n" text += self.text if not text.endswith("\n"):