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: