mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Fix invalid dict annotations in tests (#122178)
This commit is contained in:
parent
6788c43775
commit
281c66b6c2
@ -598,8 +598,8 @@ async def test_ws_delete_all_refresh_tokens(
|
|||||||
hass_admin_credential: Credentials,
|
hass_admin_credential: Credentials,
|
||||||
hass_ws_client: WebSocketGenerator,
|
hass_ws_client: WebSocketGenerator,
|
||||||
hass_access_token: str,
|
hass_access_token: str,
|
||||||
delete_token_type: dict[str:str],
|
delete_token_type: dict[str, str],
|
||||||
delete_current_token: dict[str:bool],
|
delete_current_token: dict[str, bool],
|
||||||
expected_remaining_normal_tokens: int,
|
expected_remaining_normal_tokens: int,
|
||||||
expected_remaining_long_lived_tokens: int,
|
expected_remaining_long_lived_tokens: int,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -18,7 +18,7 @@ DEFAULT_INFO: dict[str, str] = {
|
|||||||
"version": "1",
|
"version": "1",
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_UNITS: dict[dict[str, Any]] = {
|
TEST_UNITS: dict[str, dict[str, Any]] = {
|
||||||
"L1.100": {
|
"L1.100": {
|
||||||
"is_on": False,
|
"is_on": False,
|
||||||
"thermostat": 20,
|
"thermostat": 20,
|
||||||
|
@ -71,7 +71,7 @@ def mock_device_execute_response(data: dict[str, Any]) -> Generator[dict[str, An
|
|||||||
)
|
)
|
||||||
async def test_get_positions_service(
|
async def test_get_positions_service(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mock_device_execute_response: dict[str],
|
mock_device_execute_response: dict[str, Any],
|
||||||
entity_id: str,
|
entity_id: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test that get_positions service response snapshots match."""
|
"""Test that get_positions service response snapshots match."""
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
"""Tests for the OurGroceries integration."""
|
"""Tests for the OurGroceries integration."""
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
def items_to_shopping_list(items: list, version_id: str = "1") -> dict[dict[list]]:
|
|
||||||
|
def items_to_shopping_list(
|
||||||
|
items: list, version_id: str = "1"
|
||||||
|
) -> dict[str, dict[str, Any]]:
|
||||||
"""Convert a list of items into a shopping list."""
|
"""Convert a list of items into a shopping list."""
|
||||||
return {"list": {"versionId": version_id, "items": items}}
|
return {"list": {"versionId": version_id, "items": items}}
|
||||||
|
@ -627,7 +627,7 @@ async def test_config_entry_options_track(
|
|||||||
config_entry_setup: ConfigEntry,
|
config_entry_setup: ConfigEntry,
|
||||||
config_entry_options: MappingProxyType[str, Any],
|
config_entry_options: MappingProxyType[str, Any],
|
||||||
counts: tuple[int],
|
counts: tuple[int],
|
||||||
expected: dict[tuple[bool | None]],
|
expected: tuple[tuple[bool | None, ...], ...],
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the different config entry options.
|
"""Test the different config entry options.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user