Fix invalid dict annotations in tests (#122178)

This commit is contained in:
Marc Mueller 2024-07-19 14:45:42 +02:00 committed by GitHub
parent 6788c43775
commit 281c66b6c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 6 deletions

View File

@ -598,8 +598,8 @@ async def test_ws_delete_all_refresh_tokens(
hass_admin_credential: Credentials,
hass_ws_client: WebSocketGenerator,
hass_access_token: str,
delete_token_type: dict[str:str],
delete_current_token: dict[str:bool],
delete_token_type: dict[str, str],
delete_current_token: dict[str, bool],
expected_remaining_normal_tokens: int,
expected_remaining_long_lived_tokens: int,
) -> None:

View File

@ -18,7 +18,7 @@ DEFAULT_INFO: dict[str, str] = {
"version": "1",
}
TEST_UNITS: dict[dict[str, Any]] = {
TEST_UNITS: dict[str, dict[str, Any]] = {
"L1.100": {
"is_on": False,
"thermostat": 20,

View File

@ -71,7 +71,7 @@ def mock_device_execute_response(data: dict[str, Any]) -> Generator[dict[str, An
)
async def test_get_positions_service(
hass: HomeAssistant,
mock_device_execute_response: dict[str],
mock_device_execute_response: dict[str, Any],
entity_id: str,
) -> None:
"""Test that get_positions service response snapshots match."""

View File

@ -1,6 +1,10 @@
"""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."""
return {"list": {"versionId": version_id, "items": items}}

View File

@ -627,7 +627,7 @@ async def test_config_entry_options_track(
config_entry_setup: ConfigEntry,
config_entry_options: MappingProxyType[str, Any],
counts: tuple[int],
expected: dict[tuple[bool | None]],
expected: tuple[tuple[bool | None, ...], ...],
) -> None:
"""Test the different config entry options.