From 9a98fb55e37471b520223c513c0a0af217d57e36 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Mon, 26 Aug 2024 23:29:52 +0300 Subject: [PATCH] b/c...py: type hint function `rewrite_file` completely --- bytebeat_compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bytebeat_compiler.py b/bytebeat_compiler.py index 48444ce..994915b 100644 --- a/bytebeat_compiler.py +++ b/bytebeat_compiler.py @@ -61,7 +61,7 @@ def fetch(name: str): def read_file(path: str) -> str: return open(path, "r", encoding="utf-8-sig").read() -def rewrite_file(path: str, content: str): +def rewrite_file(path: str, content: str) -> int: return open(path, "w", encoding="utf-8").write(content) def read_from_file_or_stdin(path: str) -> str: