rename class methods so they don't use a dunder format
All checks were successful
ci/woodpecker/push/tests Pipeline was successful

This commit is contained in:
Ivan Schaller 2022-05-25 22:18:23 +02:00
parent 3336649ada
commit 0305631f78
3 changed files with 5 additions and 9 deletions

View file

@ -12,7 +12,7 @@ from mangadlp.api.mangadex import Mangadex
class MangaDLP:
"""Download Mangas from supported sites.
After initialization, start the script with the function __main__().
After initialization, start the script with the function get_manga().
:param url_uuid: URL or UUID of the manga
:param language: Manga language with country codes. "en" --> english
@ -50,9 +50,9 @@ class MangaDLP:
self.download_wait = download_wait
self.verbose = verbose
# prepare everything
self.__prepare__()
self._prepare()
def __prepare__(self) -> None:
def _prepare(self) -> None:
# additional stuff
# set manga format suffix
if self.file_format and "." not in self.file_format:
@ -71,10 +71,6 @@ class MangaDLP:
self.manga_chapter_list = self.api.chapter_list
self.manga_path = Path(f"{self.download_path}/{self.manga_title}")
def __main__(self):
# start flow
self.get_manga()
def pre_checks(self) -> None:
# prechecks userinput/options
# no url and no readin list given

View file

@ -49,7 +49,7 @@ def call_app(args):
args.wait,
args.verbose,
)
mdlp.__main__()
mdlp.get_manga()
def get_args():

View file

@ -19,7 +19,7 @@ def test_full_api_mangadex():
download_wait=0.5,
verbose=True,
)
mdlp.__main__()
mdlp.get_manga()
assert manga_path.exists() and manga_path.is_dir()
assert chapter_path.exists() and chapter_path.is_file()