code_generation_hashes json files end with newline

Bug: None
Change-Id: Iddd2c1777a1d5486a4d390c6e3d56ffb09f47f02
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4574569
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
This commit is contained in:
Roman Lavrov
2023-05-30 13:56:19 -04:00
committed by Angle LUCI CQ
parent 01f629e31a
commit 8447e2792a
34 changed files with 36 additions and 39 deletions

View File

@@ -270,12 +270,9 @@ def main():
for fname, new_hashes in all_new_hashes.items():
hash_fname = os.path.join(hash_dir, fname)
json.dump(
new_hashes,
open(hash_fname, "w"),
indent=2,
sort_keys=True,
separators=(',', ':\n '))
with open(hash_fname, "w") as f:
json.dump(new_hashes, f, indent=2, sort_keys=True, separators=(',', ':\n '))
f.write('\n') # json.dump doesn't end with newline
if __name__ == '__main__':