Skip to content

Commit 0e80c31

Browse files
committed
Simplify writing json
1 parent d3ad7b9 commit 0e80c31

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/extract_locale_strings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@
2222

2323
if output:
2424
result_file_path = project_root_path / "locale" / "en.json"
25-
with open(result_file_path, "w", encoding="utf-8") as result_file:
26-
result_file.write(json.dumps(output, indent=2, ensure_ascii=False))
25+
result_file_path.write_text(json.dumps(output, indent=2, ensure_ascii=False), encoding="utf-8")

0 commit comments

Comments
 (0)