Skip to content

Commit a6ba573

Browse files
committed
Removed unused ParamSpec and added a consistency check in the tests.
1 parent be7cb78 commit a6ba573

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

beets/logging.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
)
4141
from typing import TYPE_CHECKING, Any, Mapping, TypeVar, overload
4242

43-
from typing_extensions import ParamSpec
44-
4543
__all__ = [
4644
"DEBUG",
4745
"INFO",
@@ -60,9 +58,6 @@
6058
T = TypeVar("T")
6159

6260

63-
P = ParamSpec("P")
64-
65-
6661
def _logsafe(val: T) -> str | T:
6762
"""Coerce `bytes` to `str` to avoid crashes solely due to logging.
6863

test/test_logging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_str_format_logging(
6262
with caplog.at_level(level, logger="test_logger"):
6363
logger.log(level, msg, *args, **kwargs)
6464

65+
assert caplog.records, "No log records were captured"
6566
assert str(caplog.records[0].msg) == expected
6667

6768

0 commit comments

Comments
 (0)