Improve iterable typing (2) (#79296)

* Improve iterable typing (2)

* Use collection
This commit is contained in:
Marc Mueller 2022-10-01 00:13:15 +02:00 committed by GitHub
parent 3a9ecab98a
commit 249922ba1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -489,7 +489,7 @@ class HomeKit:
advertise_ip: str | None,
entry_id: str,
entry_title: str,
devices: Iterable[str] | None = None,
devices: list[str] | None = None,
) -> None:
"""Initialize a HomeKit object."""
self.hass = hass

View File

@ -2,7 +2,7 @@
from __future__ import annotations
import asyncio
from collections.abc import Iterable
from collections.abc import Collection, Iterable
from aiolifx.aiolifx import LifxDiscovery, Light, ScanManager
@ -17,7 +17,7 @@ from .const import CONF_SERIAL, DOMAIN
DEFAULT_TIMEOUT = 8.5
async def async_discover_devices(hass: HomeAssistant) -> Iterable[Light]:
async def async_discover_devices(hass: HomeAssistant) -> Collection[Light]:
"""Discover lifx devices."""
all_lights: dict[str, Light] = {}
broadcast_addrs = await network.async_get_ipv4_broadcast_addresses(hass)