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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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],