Skip to content

Commit

Permalink
fix: set explicit utf-8 encoding as part of writer invocation (#27)
Browse files Browse the repository at this point in the history
* fix: set explicit utf-8 encoding as part of writer invocation

* chore: bump requests
  • Loading branch information
aorumbayev authored Jun 13, 2024
1 parent b7a45e0 commit 002de46
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def main() -> None:
logger.info(f" Building app {app.name}")
app_spec = app.build()
logger.info(f" Writing {example.name}/application.json")
(example / "application.json").write_text(to_json(app_spec))
(example / "application.json").write_text(to_json(app_spec), encoding="utf-8")


if __name__ == "__main__":
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/algokit_client_generator/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def generate_client(input_path: Path, output_path: Path) -> None:

context = GenerateContext(app_spec)
output = render(generate(context))
output_path.write_text(output)
output_path.write_text(output, encoding="utf-8")
logger.info(f"Output typed client for {app_spec.contract.name} to {output_path}")


Expand Down

1 comment on commit 002de46

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_client_generator
   __main__.py220%1–3
   cli.py47470%1–81
   document.py82890%44, 47, 49–50, 55, 69, 74–75
   generator.py462699%22, 119, 264, 816, 990, 1005
   spec.py115199%80
   utils.py1081289%24, 41–42, 44, 46, 48, 50, 52, 55–56, 82, 111
TOTAL8337691% 

Tests Skipped Failures Errors Time
42 0 💤 0 ❌ 0 🔥 20.008s ⏱️

Please sign in to comment.