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:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user