Generics and other type hint improvements (#45250)

This commit is contained in:
Ville Skyttä 2021-01-18 23:23:25 +02:00 committed by GitHub
parent 4928476abe
commit 94dbcc9d2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 92 additions and 45 deletions

View file

@ -9,6 +9,8 @@ from homeassistant import bootstrap
from homeassistant.core import callback
from homeassistant.helpers.frame import warn_use
# mypy: disallow-any-generics
#
# Python 3.8 has significantly less workers by default
# than Python 3.7. In order to be consistent between
@ -81,7 +83,7 @@ class HassEventLoopPolicy(asyncio.DefaultEventLoopPolicy): # type: ignore[valid
@callback
def _async_loop_exception_handler(_: Any, context: Dict) -> None:
def _async_loop_exception_handler(_: Any, context: Dict[str, Any]) -> None:
"""Handle all exception inside the core loop."""
kwargs = {}
exception = context.get("exception")