Skip to content

Commit 1566b62

Browse files
committed
Use PEP 695 syntax
1 parent 74dadf7 commit 1566b62

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

sphinx/util/display.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
if TYPE_CHECKING:
1111
from collections.abc import Callable, Iterable, Iterator
1212
from types import TracebackType
13-
from typing import Any, ParamSpec, TypeVar
14-
15-
P = ParamSpec('P')
16-
R = TypeVar('R')
13+
from typing import Any
1714

1815
logger = logging.getLogger(__name__)
1916

@@ -89,7 +86,7 @@ def __exit__(
8986

9087
return False
9188

92-
def __call__(self, f: Callable[P, R]) -> Callable[P, R]:
89+
def __call__[**P, R](self, f: Callable[P, R]) -> Callable[P, R]:
9390
@functools.wraps(f)
9491
def wrapper(*args: P.args, **kwargs: P.kwargs) -> R: # type: ignore[return]
9592
with self:

0 commit comments

Comments
 (0)