b/c...py: rename rewrite_file
to overwrite_file
This commit is contained in:
parent
9a98fb55e3
commit
8511227eaa
@ -61,7 +61,7 @@ def fetch(name: str):
|
|||||||
def read_file(path: str) -> str:
|
def read_file(path: str) -> str:
|
||||||
return open(path, "r", encoding="utf-8-sig").read()
|
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)
|
return open(path, "w", encoding="utf-8").write(content)
|
||||||
|
|
||||||
def read_from_file_or_stdin(path: str) -> str:
|
def read_from_file_or_stdin(path: str) -> str:
|
||||||
@ -108,7 +108,7 @@ def compile_substituted_file(input_file: str, output_file: str) -> None:
|
|||||||
|
|
||||||
def main_workflow(input_file: str, output_file: str, \
|
def main_workflow(input_file: str, output_file: str, \
|
||||||
substitute_contents: Dict[str, str]) -> None:
|
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)
|
compile_substituted_file(input_file, output_file)
|
||||||
|
|
||||||
preprocessor_bool = lambda value: "1" if value else "0"
|
preprocessor_bool = lambda value: "1" if value else "0"
|
||||||
|
Loading…
Reference in New Issue
Block a user