Removed unused ParamSpec and added a consistency check in the tests.

This commit is contained in:
Sebastian Mohr 2025-09-19 15:39:43 +02:00
parent b2fc007480
commit caebf185f1
2 changed files with 1 additions and 5 deletions

View file

@ -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.

View file

@ -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