From 63c5e5a62882d5f05d820839aceca9cf79a452b6 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Mon, 26 Aug 2024 23:31:30 +0300 Subject: [PATCH] b/c...py: rename `rewrite_file` to `overwrite_file` --- bytebeat_compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bytebeat_compiler.py b/bytebeat_compiler.py index af8ded5..e2107bc 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) -> int: +def overwrite_file(path: str, content: str) -> int: return open(path, "w", encoding="utf-8").write(content) def read_from_file_or_stdin(path: str) -> str: @@ -107,7 +107,7 @@ def compile_substituted_file(input_file: str, output_file: str) -> None: def main_workflow(input_file: str, output_file: str, \ substitute_contents: Dict[str, str]) -> None: - rewrite_file(input_file, substitute_contents) + overwrite_file(input_file, substitute_contents) compile_substituted_file(input_file, output_file) preprocessor_bool = lambda value: "1" if value else "0"