Skip to content

Commit

Permalink
Add missing hass type hint in component tests (x) (home-assistant#124285
Browse files Browse the repository at this point in the history
)
  • Loading branch information
epenet authored Aug 20, 2024
1 parent c2dc4ef commit 69a5605
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions tests/components/xiaomi_miio/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/components/xiaomi_miio/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
2 changes: 1 addition & 1 deletion tests/components/xiaomi_miio/test_vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit 69a5605

Please sign in to comment.