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

Improve typing for core add_job and run_job methods (#70702)

This commit is contained in:
Marc Mueller
2022-04-25 23:50:01 +02:00
committed by GitHub
parent 0d9191c344
commit c1d2017988
2 changed files with 21 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
import asyncio
from collections import ChainMap
from collections.abc import Awaitable, Callable, Iterable, Mapping
from collections.abc import Callable, Coroutine, Iterable, Mapping
from contextvars import ContextVar
import dataclasses
from enum import Enum
@@ -160,7 +160,7 @@ class OperationNotAllowed(ConfigError):
"""Raised when a config entry operation is not allowed."""
UpdateListenerType = Callable[[HomeAssistant, "ConfigEntry"], Awaitable[None]]
UpdateListenerType = Callable[[HomeAssistant, "ConfigEntry"], Coroutine[Any, Any, None]]
class ConfigEntry: