read/lines
This commit is contained in:
parent
b3e66ec1c3
commit
78dd431ca5
1 changed files with 3 additions and 2 deletions
|
@ -58,8 +58,9 @@ def read_file_bytes(file_path: str) -> bytes:
|
||||||
return file_object.read()
|
return file_object.read()
|
||||||
|
|
||||||
|
|
||||||
def read_file_lines(file_path: str, charset: str = CHARSET):
|
def read_file_lines(file_path: str, charset: str = CHARSET) -> list[str]:
|
||||||
return read_file_text(file_path).split(os.linesep)
|
"""Read whole file lines."""
|
||||||
|
return read_file_text(file_path, charset).split(os.linesep)
|
||||||
|
|
||||||
|
|
||||||
def read_file_text(file_path: str, charset: str = CHARSET) -> str:
|
def read_file_text(file_path: str, charset: str = CHARSET) -> str:
|
||||||
|
|
Loading…
Reference in a new issue