Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated-typing-alias pylint warnings in zha tests #119453

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions tests/components/zha/test_registries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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():
Expand Down
Loading