Skip to main content

This should be write, not write_text

ID
c4c8ea7
date
2024-09-07 20:53:50+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
b7fe765
message
This should be `write`, not `write_text`
changed files
1 file, 1 addition, 1 deletion

Changed files

src/javascript/__init__.py (5933) → src/javascript/__init__.py (5928)

diff --git a/src/javascript/__init__.py b/src/javascript/__init__.py
index 54e993b..a4306f2 100644
--- a/src/javascript/__init__.py
+++ b/src/javascript/__init__.py
@@ -90,7 +90,7 @@ def write_js(p: pathlib.Path | str, *, value: typing.Any, varname: str) -> None:
     tmp_p = p.with_suffix(f".{uuid.uuid4()}.js.tmp")
 
     with tmp_p.open("x") as out_file:
-        out_file.write_text(js_string)
+        out_file.write(js_string)
 
     tmp_p.rename(p)