Skip to main content

Merge pull request #23 from alexwlchan/fix-types

ID
cbb6cab
date
2024-09-07 20:54:43+00:00
author
Alex Chan <alex@alexwlchan.net>
parents
b7fe765, c4c8ea7
message
Merge pull request #23 from alexwlchan/fix-types

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)