pmb.helpers.logging: Use PEP 8-compliant naming (MR 2537)

See https://docs.astral.sh/ruff/rules/invalid-class-name
This commit is contained in:
Newbyte 2025-01-19 14:12:35 +01:00 committed by Oliver Smith
parent 97da7ebe4e
commit 1965818fae
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -20,7 +20,7 @@ NOTSET: Final[int] = logging.NOTSET
VERBOSE: Final[int] = 5
class log_handler(logging.StreamHandler):
class LogHandler(logging.StreamHandler):
"""Write to stdout and to the already opened log file."""
def __init__(self, details_to_stdout: bool = False, quiet: bool = False) -> None:
@ -148,7 +148,7 @@ def init(logfile: Path, verbose: bool, details_to_stdout: bool = False) -> None:
root_logger.setLevel(VERBOSE)
# Add a custom log handler
handler = log_handler(details_to_stdout=details_to_stdout)
handler = LogHandler(details_to_stdout=details_to_stdout)
handler.setFormatter(formatter)
root_logger.addHandler(handler)