mirror of
https://github.com/wassname/sloth.git
synced 2026-06-27 18:25:49 +08:00
Add a newline add the end of the JSON file
Editors like Vim add a newline at the end of the file when saving. git then complains loudly about the "change": -] \ No newline at end of file +] Add a newline to the JSON file to be compatible with editors.
This commit is contained in:
@@ -313,6 +313,7 @@ class JsonContainer(AnnotationContainer):
|
||||
"""
|
||||
f = open(fname, "w")
|
||||
json.dump(annotations, f, indent=4, separators=(',', ': '), sort_keys=True)
|
||||
f.write("\n")
|
||||
|
||||
|
||||
class MsgpackContainer(AnnotationContainer):
|
||||
|
||||
Reference in New Issue
Block a user