Add type hints for FixtureRequest in tests (#118779)

This commit is contained in:
epenet 2024-06-04 10:37:54 +02:00 committed by GitHub
parent 16fd19f01a
commit b54a68750b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 67 additions and 36 deletions

View file

@ -4,6 +4,7 @@ import copy
from dataclasses import dataclass
from datetime import timedelta
import logging
from typing import Any
from unittest import mock
from freezegun.api import FrozenDateTimeFactory
@ -182,7 +183,9 @@ async def do_next_cycle(
@pytest.fixture(name="mock_test_state")
async def mock_test_state_fixture(hass, request):
async def mock_test_state_fixture(
hass: HomeAssistant, request: pytest.FixtureRequest
) -> Any:
"""Mock restore cache."""
mock_restore_cache(hass, request.param)
return request.param