Improve type hints in modbus tests (#123795)

This commit is contained in:
epenet 2024-08-13 13:15:35 +02:00 committed by GitHub
parent 30994710e6
commit 8e0dfbcd13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -192,7 +192,9 @@ async def mock_test_state_fixture(
@pytest.fixture(name="mock_modbus_ha")
async def mock_modbus_ha_fixture(hass, mock_modbus):
async def mock_modbus_ha_fixture(
hass: HomeAssistant, mock_modbus: mock.AsyncMock
) -> mock.AsyncMock:
"""Load homeassistant to allow service calls."""
assert await async_setup_component(hass, "homeassistant", {})
await hass.async_block_till_done()

View File

@ -1335,7 +1335,7 @@ async def test_wrap_sensor(hass: HomeAssistant, mock_do_cycle, expected) -> None
@pytest.fixture(name="mock_restore")
async def mock_restore(hass):
async def mock_restore(hass: HomeAssistant) -> None:
"""Mock restore cache."""
mock_restore_cache_with_extra_data(
hass,