End JSON files updated by scaffold script with a newline (#67639)

This commit is contained in:
Erik Montnemery 2022-03-04 15:50:23 +01:00 committed by GitHub
parent 749a76c4e1
commit 209a5854f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ class Info:
"""Update the integration manifest."""
print(f"Updating {self.domain} manifest: {kwargs}")
self.manifest_path.write_text(
json.dumps({**self.manifest(), **kwargs}, indent=2)
json.dumps({**self.manifest(), **kwargs}, indent=2 + "\n")
)
@property
@ -67,4 +67,6 @@ class Info:
def update_strings(self, **kwargs) -> None:
"""Update the integration strings."""
print(f"Updating {self.domain} strings: {list(kwargs)}")
self.strings_path.write_text(json.dumps({**self.strings(), **kwargs}, indent=2))
self.strings_path.write_text(
json.dumps({**self.strings(), **kwargs}, indent=2) + "\n"
)