diff --git a/rwx/err/__init__.py b/rwx/err/__init__.py index 5df6b97..294d8d8 100644 --- a/rwx/err/__init__.py +++ b/rwx/err/__init__.py @@ -1,4 +1,5 @@ """Handle errors.""" + class Error(Exception): """Parent class for all errors.""" diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 64a8483..514fcec 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -56,11 +56,11 @@ def read_file(file_path: str): return file_object.read() -def read_file_lines(file_path: str, charset:str=CHARSET): +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): return read_file(file_path).decode(charset) @@ -74,7 +74,7 @@ def wipe(path: str) -> None: pass -def write(file_path: str, text: str, charset:str=CHARSET) -> None: +def write(file_path: str, text: str, charset: str = CHARSET) -> None: """Write text into a file.""" with open(file_path, "bw") as file_object: file_object.write(text.encode(charset))