Improve type hints in template config_flow tests (#126803)

Improve type hints in template tests
This commit is contained in:
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

View File

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