Add type hints for Recorder in test fixtures (#118685)

This commit is contained in:
epenet
2024-06-03 10:17:51 +02:00
committed by GitHub
parent 666fc2333a
commit 8772a59f5c
4 changed files with 22 additions and 6 deletions

View File

@@ -21,13 +21,13 @@ from tests.typing import WebSocketGenerator
@pytest.fixture(autouse=True)
async def setup_integration(recorder_mock, hass):
async def setup_integration(recorder_mock: Recorder, hass: HomeAssistant) -> None:
"""Set up the integration."""
assert await async_setup_component(hass, "energy", {})
@pytest.fixture
def mock_energy_platform(hass):
def mock_energy_platform(hass: HomeAssistant) -> None:
"""Mock an energy platform."""
hass.config.components.add("some_domain")
mock_platform(