b/c...py: type hint function rewrite_file
completely
This commit is contained in:
parent
d51ee9e0d6
commit
9a98fb55e3
@ -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):
|
def rewrite_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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user