From 5e86605a469f4368128f83cf76073b4122f2199d Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Sat, 4 Feb 2023 14:34:13 -0800 Subject: [PATCH] Fix docstring typos --- comicapi/archivers/archiver.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/comicapi/archivers/archiver.py b/comicapi/archivers/archiver.py index 4d7efb7..efe58e5 100644 --- a/comicapi/archivers/archiver.py +++ b/comicapi/archivers/archiver.py @@ -30,28 +30,28 @@ class Archiver(Protocol): def get_comment(self) -> str: """ - Returns the comment from the archive as a string. + Returns the comment from the current archive as a string. Should always return a string. If comments are not supported in the archive the empty string should be returned. """ return "" def set_comment(self, comment: str) -> bool: """ - Returns True if the comment was successfully set on the archive. + Returns True if the comment was successfully set on the current archive. Should always return a boolean. If comments are not supported in the archive False should be returned. """ return False def supports_comment(self) -> bool: """ - Returns True if the archive supports comments. + Returns True if the current archive supports comments. Should always return a boolean. If comments are not supported in the archive False should be returned. """ return False def read_file(self, archive_file: str) -> bytes: """ - Reads the named file from the archive. + Reads the named file from the current archive. archive_file should always come from the output of get_filename_list. Should always return a bytes object. Exceptions should be of the type OSError. """ @@ -59,7 +59,7 @@ class Archiver(Protocol): def remove_file(self, archive_file: str) -> bool: """ - Removes the named file from the archive. + Removes the named file from the current archive. archive_file should always come from the output of get_filename_list. Should always return a boolean. Failures should return False. @@ -69,42 +69,42 @@ class Archiver(Protocol): def write_file(self, archive_file: str, data: bytes) -> bool: """ - Writes the named file to the archive. + Writes the named file to the current archive. Should always return a boolean. Failures should return False. """ return False def get_filename_list(self) -> list[str]: """ - Returns a list of filenames in the archive. + Returns a list of filenames in the current archive. Should always return a list of string. Failures should return an empty list. """ return [] def copy_from_archive(self, other_archive: Archiver) -> bool: """ - Copies the contents of another achive to this archive. + Copies the contents of another achive to the current archive. Should always return a boolean. Failures should return False. """ return False def is_writable(self) -> bool: """ - Retuns True if the archive is writeable + Retuns True if the current archive is writeable Should always return a boolean. Failures should return False. """ return False def extension(self) -> str: """ - Returns the extension that this archive should use eg ".cbz". + Returns the extension that this archiver should use eg ".cbz". Should always return a string. Failures should return the empty string. """ return "" def name(self) -> str: """ - Returns the name of this archive for display purposes eg "CBZ". + Returns the name of this archiver for display purposes eg "CBZ". Should always return a string. Failures should return the empty string. """ return "" @@ -112,7 +112,7 @@ class Archiver(Protocol): @classmethod def is_valid(cls, path: pathlib.Path) -> bool: """ - Returns True if the given path can be opened by this archive. + Returns True if the given path can be opened by this archiver. Should always return a boolean. Failures should return False. """ return False