mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Removed unused ParamSpec and added a consistency check in the tests.
This commit is contained in:
parent
b2fc007480
commit
caebf185f1
2 changed files with 1 additions and 5 deletions
|
|
@ -40,8 +40,6 @@ from logging import (
|
|||
)
|
||||
from typing import TYPE_CHECKING, Any, Mapping, TypeVar, overload
|
||||
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
__all__ = [
|
||||
"DEBUG",
|
||||
"INFO",
|
||||
|
|
@ -60,9 +58,6 @@ if TYPE_CHECKING:
|
|||
T = TypeVar("T")
|
||||
|
||||
|
||||
P = ParamSpec("P")
|
||||
|
||||
|
||||
def _logsafe(val: T) -> str | T:
|
||||
"""Coerce `bytes` to `str` to avoid crashes solely due to logging.
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ class TestStrFormatLogger:
|
|||
with caplog.at_level(level, logger="test_logger"):
|
||||
logger.log(level, msg, *args, **kwargs)
|
||||
|
||||
assert caplog.records, "No log records were captured"
|
||||
assert str(caplog.records[0].msg) == expected
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue