Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

fix: use utf-8 for redirect pyproject generation (#925)

Rolly Calma41e13d7df149
diff --git a/burr-redirect/generate_pyproject.py b/burr-redirect/generate_pyproject.py
index 23ac6023..3f625ca4 100644
--- a/burr-redirect/generate_pyproject.py
+++ b/burr-redirect/generate_pyproject.py
@@ -82,7 +82,7 @@ def render_extras(extras: list, version: str) -> str:
def render_template(extras: list, version: str) -> str:
"""Substitute the extras section and the version into the template text."""
- template = TEMPLATE.read_text()
+ template = TEMPLATE.read_text(encoding="utf-8")
matches = [line for line in template.splitlines() if PLACEHOLDER in line]
if not matches:
fail(
@@ -135,7 +135,7 @@ def main(argv: list) -> None:
version = argv[1]
extras = read_root_extras()
- OUTPUT.write_text(render_template(extras, version))
+ OUTPUT.write_text(render_template(extras, version), encoding="utf-8")
verify(extras, version)
print(f"Wrote {OUTPUT} for version {version} with {len(extras)} extras.")