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:
Mike Gerber
2014-08-29 15:55:19 +02:00
parent 8d9a6af7bf
commit 3bf65b9b26
+1
View File
@@ -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):