Improve type hints in deconz tests (#120388)

This commit is contained in:
epenet 2024-06-25 17:44:03 +02:00 committed by GitHub
parent 2386ed3830
commit 09e8f7e9bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ from homeassistant.const import (
CONF_TYPE, CONF_TYPE,
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
) )
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.helpers import device_registry as dr, entity_registry as er from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.helpers.trigger import async_initialize_triggers from homeassistant.helpers.trigger import async_initialize_triggers
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component
@ -44,7 +44,7 @@ def stub_blueprint_populate_autouse(stub_blueprint_populate: None) -> None:
@pytest.fixture @pytest.fixture
def automation_calls(hass): def automation_calls(hass: HomeAssistant) -> list[ServiceCall]:
"""Track automation calls to a mock service.""" """Track automation calls to a mock service."""
return async_mock_service(hass, "test", "automation") return async_mock_service(hass, "test", "automation")
@ -300,7 +300,7 @@ async def test_functional_device_trigger(
hass: HomeAssistant, hass: HomeAssistant,
aioclient_mock: AiohttpClientMocker, aioclient_mock: AiohttpClientMocker,
mock_deconz_websocket, mock_deconz_websocket,
automation_calls, automation_calls: list[ServiceCall],
device_registry: dr.DeviceRegistry, device_registry: dr.DeviceRegistry,
) -> None: ) -> None:
"""Test proper matching and attachment of device trigger automation.""" """Test proper matching and attachment of device trigger automation."""