Improve type hints in template config_flow tests (#126803)

Improve type hints in template tests
pull/126867/head
epenet 2024-09-26 19:25:33 +02:00 committed by GitHub
parent 77642b9e3d
commit 6c539cd2d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 19 additions and 19 deletions

View File

@ -156,14 +156,14 @@ from tests.typing import WebSocketGenerator
@pytest.mark.freeze_time("2024-07-09 00:00:00+00:00")
async def test_config_flow(
hass: HomeAssistant,
template_type,
state_template,
template_state,
input_states,
input_attributes,
extra_input,
extra_options,
extra_attrs,
template_type: str,
state_template: dict[str, Any],
template_state: str,
input_states: dict[str, Any],
input_attributes: dict[str, Any],
extra_input: dict[str, Any],
extra_options: dict[str, Any],
extra_attrs: dict[str, Any],
) -> None:
"""Test the config flow."""
input_entities = ["one", "two"]
@ -527,14 +527,14 @@ def get_suggested(schema, key):
@pytest.mark.freeze_time("2024-07-09 00:00:00+00:00")
async def test_options(
hass: HomeAssistant,
template_type,
old_state_template,
new_state_template,
template_state,
input_states,
extra_options,
options_options,
key_template,
template_type: str,
old_state_template: dict[str, Any],
new_state_template: dict[str, Any],
template_state: list[str],
input_states: dict[str, Any],
extra_options: dict[str, Any],
options_options: dict[str, Any],
key_template: str,
) -> None:
"""Test reconfiguring."""
input_entities = ["one", "two"]
@ -656,7 +656,7 @@ async def test_config_flow_preview(
template_type: str,
state_template: str,
extra_user_input: dict[str, Any],
input_states: list[str],
input_states: dict[str, Any],
template_states: str,
extra_attributes: list[dict[str, Any]],
listeners: list[list[str]],
@ -806,7 +806,7 @@ async def test_config_flow_preview_bad_input(
template_type: str,
state_template: str,
extra_user_input: dict[str, str],
error: str,
error: dict[str, str],
) -> None:
"""Test the config flow preview."""
client = await hass_ws_client(hass)
@ -1118,7 +1118,7 @@ async def test_option_flow_preview(
new_state_template: str,
extra_config_flow_data: dict[str, Any],
extra_user_input: dict[str, Any],
input_states: list[str],
input_states: dict[str, Any],
template_state: str,
extra_attributes: dict[str, Any],
listeners: list[str],