From 3fe2dd4de0240e6e60dc2444c8bf2c407822a2cc Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Fri, 23 Aug 2024 07:50:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20Minify=20output=20of=20`needs.js?= =?UTF-8?q?on`=20(#1233)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing the indent of `json.dump` means it will now be output on a single line; reducing the size of the stored JSON. --- sphinx_needs/needsfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx_needs/needsfile.py b/sphinx_needs/needsfile.py index 7179fd15e..552f0fd19 100644 --- a/sphinx_needs/needsfile.py +++ b/sphinx_needs/needsfile.py @@ -203,7 +203,7 @@ def write_json(self, needs_file: str = "needs.json", needs_path: str = "") -> No needs_dir = self.outdir with open(os.path.join(needs_dir, needs_file), "w") as f: - json.dump(self.needs_list, f, indent=4, sort_keys=True) + json.dump(self.needs_list, f, sort_keys=True) def load_json(self, file: str) -> None: if not os.path.isabs(file):