Import Generator from typing_extensions (1) (#118986)

This commit is contained in:
Marc Mueller
2024-06-06 17:02:13 +02:00
committed by GitHub
parent 69708db8e0
commit fe21e2b8ba
34 changed files with 134 additions and 118 deletions

View File

@ -4,7 +4,7 @@ from __future__ import annotations
import asyncio
from collections import defaultdict
from collections.abc import AsyncGenerator, Callable, Coroutine, Iterable
from collections.abc import Callable, Coroutine, Iterable
import contextlib
from dataclasses import dataclass
from functools import lru_cache, partial
@ -18,6 +18,7 @@ from typing import TYPE_CHECKING, Any
import uuid
import certifi
from typing_extensions import AsyncGenerator
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
@ -521,7 +522,7 @@ class MQTT:
self._cleanup_on_unload.pop()()
@contextlib.asynccontextmanager
async def _async_connect_in_executor(self) -> AsyncGenerator[None, None]:
async def _async_connect_in_executor(self) -> AsyncGenerator[None]:
# While we are connecting in the executor we need to
# handle on_socket_open and on_socket_register_write
# in the executor as well.