Skip to content

Commit 6572eff

Browse files
core: libs: commonwealth: settings: pykson: Save in pretty json
Signed-off-by: Patrick José Pereira <[email protected]>
1 parent 7b9cf87 commit 6572eff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/libs/commonwealth/commonwealth/settings/bases/pykson_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def save(self, file_path: pathlib.Path) -> None:
9292

9393
with open(file_path, "w", encoding="utf-8") as settings_file:
9494
logger.debug(f"Saving settings on: {file_path}")
95-
settings_file.write(Pykson().to_json(self))
95+
settings_file.write(json.dumps(json.loads(Pykson().to_json(self)), indent=4))
9696

9797
def reset(self) -> None:
9898
"""Reset internal data to default values"""

0 commit comments

Comments
 (0)