1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use PEP 695 for function annotations (3) (#117660)

This commit is contained in:
Marc Mueller
2024-05-18 11:43:32 +02:00
committed by GitHub
parent 34ea781031
commit 4cf0a3f154
10 changed files with 48 additions and 74 deletions

View File

@@ -125,7 +125,6 @@ SAVE_DELAY = 1
DISCOVERY_COOLDOWN = 1
_DataT = TypeVar("_DataT", default=Any)
_R = TypeVar("_R")
class ConfigEntryState(Enum):
@@ -1108,7 +1107,7 @@ class ConfigEntry(Generic[_DataT]):
)
@callback
def async_create_task(
def async_create_task[_R](
self,
hass: HomeAssistant,
target: Coroutine[Any, Any, _R],
@@ -1132,7 +1131,7 @@ class ConfigEntry(Generic[_DataT]):
return task
@callback
def async_create_background_task(
def async_create_background_task[_R](
self,
hass: HomeAssistant,
target: Coroutine[Any, Any, _R],