make sure codegen doesn't cause spurious diffs for no reason

This commit is contained in:
Ashwin Bharambe 2024-11-20 13:55:43 -08:00
parent 681322731b
commit 00816cc8ef
2 changed files with 2 additions and 2 deletions

View file

@ -103,7 +103,7 @@ def generate_dependencies_file():
deps_file = REPO_ROOT / "distributions" / "dependencies.json" deps_file = REPO_ROOT / "distributions" / "dependencies.json"
with open(deps_file, "w") as f: with open(deps_file, "w") as f:
json.dump(distribution_deps, f, indent=2) f.write(json.dumps(distribution_deps, indent=2) + "\n")
def main(): def main():

View file

@ -161,4 +161,4 @@ class DistributionTemplate(BaseModel):
docs = self.generate_markdown_docs() docs = self.generate_markdown_docs()
with open(doc_output_dir / f"{self.name}.md", "w") as f: with open(doc_output_dir / f"{self.name}.md", "w") as f:
f.write(docs) f.write(docs if docs.endswith("\n") else docs + "\n")