Use PEP 695 for function annotations (3) (#117660)
This commit is contained in:
parent
34ea781031
commit
4cf0a3f154
10 changed files with 48 additions and 74 deletions
|
@ -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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue