Add type hints for FixtureRequest in tests (#118779)
This commit is contained in:
parent
16fd19f01a
commit
b54a68750b
27 changed files with 67 additions and 36 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue