From 6bc53a0169ee7483c488f0248bd37c79480a7d29 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 0b541e1..af8ded5 100644 --- a/bytebeat_compiler.py +++ b/bytebeat_compiler.py @@ -60,7 +60,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: