Skip to content

Commit

Permalink
flush generated scripts before formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
odrling committed Oct 5, 2024
1 parent a3829d7 commit 58eba96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/mahou/serializers/aiohttp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def serialize(self, input: Server) -> str:

with tempfile.NamedTemporaryFile("w") as fp:
fp.write(rendered)
fp.flush()
ruff_fix(fp.name)
ruff_format(fp.name)
with open(fp.name, "r") as fp2:
Expand Down
1 change: 1 addition & 0 deletions src/mahou/serializers/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def serialize(self, input: list[Schema]) -> str:

with tempfile.NamedTemporaryFile("w") as fp:
fp.write(rendered)
fp.flush()
ruff_fix(fp.name)
ruff_format(fp.name)
with open(fp.name, "r") as fp2:
Expand Down

0 comments on commit 58eba96

Please sign in to comment.