Skip to content

Commit

Permalink
Applied refactoring (pytest-dev#10991)
Browse files Browse the repository at this point in the history
Removed default constructor and documentation for the internal class.

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
  • Loading branch information
theirix and nicoddemus committed May 30, 2023
1 parent 8493a59 commit 540eb6f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion changelog/10991.improvement.rst
Original file line number Diff line number Diff line change
@@ -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`.
2 changes: 0 additions & 2 deletions src/_pytest/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 540eb6f

Please sign in to comment.