add newline at end of json files to make them more suitable for editors who always want a newline at EOF
Hanno Böck

Hanno Böck commited on 2022-05-23 18:32:02
Zeige 1 geänderte Dateien mit 1 Einfügungen und 1 Löschungen.

... ...
@@ -23,7 +23,7 @@ class TestJsonLint(unittest.TestCase):
23 23
             orig = fp.read()
24 24
             fp.close()
25 25
             tmp = json.loads(orig)
26
-            new = json.dumps(tmp, indent=2)
26
+            new = json.dumps(tmp, indent=2) + "\n"
27 27
             if orig != new:
28 28
                 print(f"json {f} not valid")
29 29
                 sys.stdout.writelines(difflib.unified_diff(orig, new))
30 30