From 78dd431ca5fd969841774f9deb4129d9eb299c7f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 13 Sep 2024 18:58:57 +0200 Subject: [PATCH] read/lines --- rwx/fs/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 82b7c16..a8865e7 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -58,8 +58,9 @@ def read_file_bytes(file_path: str) -> bytes: return file_object.read() -def read_file_lines(file_path: str, charset: str = CHARSET): - return read_file_text(file_path).split(os.linesep) +def read_file_lines(file_path: str, charset: str = CHARSET) -> list[str]: + """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: