read/text

This commit is contained in:
Marc Beninca 2024-09-13 18:57:49 +02:00
parent 065d647e51
commit b3e66ec1c3
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -62,7 +62,8 @@ def read_file_lines(file_path: str, charset: str = CHARSET):
return read_file_text(file_path).split(os.linesep)
def read_file_text(file_path: str, charset: str = CHARSET):
def read_file_text(file_path: str, charset: str = CHARSET) -> str:
"""Read whole file text."""
return read_file_bytes(file_path).decode(charset)