diff --git a/tests/components/zha/test_registries.py b/tests/components/zha/test_registries.py index 279975a260fc28..1f982adab5eca6 100644 --- a/tests/components/zha/test_registries.py +++ b/tests/components/zha/test_registries.py @@ -2,20 +2,18 @@ from __future__ import annotations -import typing from unittest import mock import pytest +from typing_extensions import Generator import zigpy.quirks as zigpy_quirks from homeassistant.components.zha.binary_sensor import IASZone from homeassistant.components.zha.core import registries from homeassistant.components.zha.core.const import ATTR_QUIRK_ID +from homeassistant.components.zha.entity import ZhaEntity from homeassistant.helpers import entity_registry as er -if typing.TYPE_CHECKING: - from homeassistant.components.zha.core.entity import ZhaEntity - MANUFACTURER = "mock manufacturer" MODEL = "mock model" QUIRK_CLASS = "mock.test.quirk.class" @@ -532,7 +530,7 @@ class SmartEnergySensor3: } -def iter_all_rules() -> typing.Iterable[registries.MatchRule, list[type[ZhaEntity]]]: +def iter_all_rules() -> Generator[tuple[registries.MatchRule, list[type[ZhaEntity]]]]: """Iterate over all match rules and their corresponding entities.""" for rules in registries.ZHA_ENTITIES._strict_registry.values():