From 540eb6f08ba6e016c3584219da5399e6bd9df31d Mon Sep 17 00:00:00 2001 From: theirix Date: Tue, 30 May 2023 14:31:36 +0300 Subject: [PATCH] Applied refactoring (#10991) Removed default constructor and documentation for the internal class. Co-authored-by: Bruno Oliveira --- changelog/10991.improvement.rst | 1 - src/_pytest/logging.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/changelog/10991.improvement.rst b/changelog/10991.improvement.rst index 40ae9eda4..768c08e55 100644 --- a/changelog/10991.improvement.rst +++ b/changelog/10991.improvement.rst @@ -1,2 +1 @@ Added handling of ``%f`` directive to print microseconds in log format options, such as ``log-date-format``. -Added helper :class:`pytest.logging.DatetimeFormatter <_pytest.logging.DatetimeFormatter>` which overrides :class:`logging.Formatter` behaviour to print log records with a microsecond-aware function :func:`datetime.strftime` instead of :func:`time.strftime`. diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py index 4c5c53a14..421e5cebc 100644 --- a/src/_pytest/logging.py +++ b/src/_pytest/logging.py @@ -63,8 +63,6 @@ class DatetimeFormatter(logging.Formatter): :func:`time.strftime` in case of microseconds in format string. """ - def __init__(self, *args, **kwargs) -> None: - super().__init__(*args, **kwargs) def formatTime(self, record: LogRecord, datefmt=None) -> str: if datefmt and "%f" in datefmt: