mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Use PEP 695 for decorator typing (3) (#117640)
This commit is contained in:
@@ -14,7 +14,7 @@ import reprlib
|
||||
import sqlite3
|
||||
import ssl
|
||||
import threading
|
||||
from typing import TYPE_CHECKING, Any, ParamSpec, TypeVar, cast
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
from unittest.mock import AsyncMock, MagicMock, Mock, patch
|
||||
|
||||
from aiohttp import client
|
||||
@@ -204,11 +204,7 @@ class HAFakeDatetime(freezegun.api.FakeDatetime): # type: ignore[name-defined]
|
||||
return ha_datetime_to_fakedatetime(result)
|
||||
|
||||
|
||||
_R = TypeVar("_R")
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
|
||||
def check_real(func: Callable[_P, Coroutine[Any, Any, _R]]):
|
||||
def check_real[**_P, _R](func: Callable[_P, Coroutine[Any, Any, _R]]):
|
||||
"""Force a function to require a keyword _test_real to be passed in."""
|
||||
|
||||
@functools.wraps(func)
|
||||
|
||||
Reference in New Issue
Block a user