Add missing hass type hint in component tests (x) (#124285)

This commit is contained in:
epenet 2024-08-20 12:54:57 +02:00 committed by GitHub
parent c2dc4ef215
commit 69a5605551
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -704,7 +704,7 @@ async def test_config_flow_step_device_manual_model_succes(hass: HomeAssistant)
}
async def config_flow_device_success(hass, model_to_test):
async def config_flow_device_success(hass: HomeAssistant, model_to_test: str) -> None:
"""Test a successful config flow for a device (base class)."""
result = await hass.config_entries.flow.async_init(
const.DOMAIN, context={"source": config_entries.SOURCE_USER}
@ -748,7 +748,7 @@ async def config_flow_device_success(hass, model_to_test):
}
async def config_flow_generic_roborock(hass):
async def config_flow_generic_roborock(hass: HomeAssistant) -> None:
"""Test a successful config flow for a generic roborock vacuum."""
dummy_model = "roborock.vacuum.dummy"
@ -794,7 +794,9 @@ async def config_flow_generic_roborock(hass):
}
async def zeroconf_device_success(hass, zeroconf_name_to_test, model_to_test):
async def zeroconf_device_success(
hass: HomeAssistant, zeroconf_name_to_test: str, model_to_test: str
) -> None:
"""Test a successful zeroconf discovery of a device (base class)."""
result = await hass.config_entries.flow.async_init(
const.DOMAIN,

View File

@ -141,7 +141,7 @@ async def test_select_coordinator_update(hass: HomeAssistant, setup_test) -> Non
assert state.state == "left"
async def setup_component(hass, entity_name):
async def setup_component(hass: HomeAssistant, entity_name: str) -> str:
"""Set up component."""
entity_id = f"{DOMAIN}.{entity_name}"

View File

@ -533,7 +533,7 @@ async def test_xiaomi_vacuum_fanspeeds(
assert "Fan speed step not recognized" in caplog.text
async def setup_component(hass, entity_name):
async def setup_component(hass: HomeAssistant, entity_name: str) -> str:
"""Set up vacuum component."""
entity_id = f"{DOMAIN}.{entity_name}"