[2.2.14] - 2022-10-06 #27

Merged
olofvndrhr merged 2 commits from dev into master 2022-10-06 22:41:49 +02:00
3 changed files with 7 additions and 5 deletions
Showing only changes of commit 1034532ad6 - Show all commits

View file

@ -91,7 +91,7 @@ test_autoflake:
@python3 -m autoflake --check --remove-all-unused-imports -r -v mangadlp/
test_pylama:
@python3 -m pylama mangadlp/
@python3 -m pylama --options tox.ini mangadlp/
test_pylint:
@python3 -m pylint --fail-under 9 mangadlp/

View file

@ -269,7 +269,7 @@ class MangaDLP:
# check if chapter already exists
# check for folder, if file format is an empty string
if chapter_archive_path.exists():
log.warning(f"'{chapter_archive_path}' already exists. Skipping")
log.info(f"'{chapter_archive_path}' already exists. Skipping")
self.hook.run(
"chapter_pre", {"status": "skipped", "reason": "Existing"}, {}

View file

@ -1,11 +1,13 @@
import logging
DATE_FMT = "%Y-%m-%dT%H:%M:%S%z"
# prepare custom levels and default config of logger
def prepare_logger():
logging.basicConfig(
format="%(asctime)s | [%(levelname)s] [%(name)s]: %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
datefmt=DATE_FMT,
level=20,
handlers=[logging.StreamHandler()],
)
@ -21,13 +23,13 @@ def format_logger(verbosity: int):
if verbosity >= 20:
logging.basicConfig(
format="%(asctime)s | %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
datefmt=DATE_FMT,
force=True,
)
else:
logging.basicConfig(
format="%(asctime)s | [%(levelname)s] [%(name)s]: %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
datefmt=DATE_FMT,
force=True,
)