parser: pprint settings_file.py
Use pprint for settings map instead of just casting to string. This
makes the output of the tool better for git-diff because it is sorted
and multiple lines.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/settings_parser.py b/settings_parser.py
index 46bb474..9e74f91 100755
--- a/settings_parser.py
+++ b/settings_parser.py
@@ -5,6 +5,7 @@
# adding dependencies to additional modules like yaml
import yaml
+import pprint
SETTINGS_FILE = 'settings.yaml'
OUTPUT_FILE = 'settings_file.py'
@@ -16,5 +17,5 @@
with open(OUTPUT_FILE, 'w') as f:
f.write(FILE_HEADER)
f.write('\n')
- f.write('SETTINGS=')
- f.write(str(data))
+ f.write('SETTINGS=\\\n')
+ pprint.pprint(data, stream=f)