1
0

b/c...py: type hint function rewrite_file completely

This commit is contained in:
Intel A80486DX2-66 2024-08-26 23:29:52 +03:00
parent c043d0ce94
commit 6bc53a0169
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -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: