Add more type hints to conftest.py (#87842)
* Add more type hints in conftest.py * Adjust stop_hass * Adjust mock_integration_frame * Adjust pylint plugin
This commit is contained in:
parent
6d87ebc7de
commit
b7b82b1e3f
6 changed files with 64 additions and 31 deletions
|
@ -1,7 +1,7 @@
|
|||
"""Test state helpers."""
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
from unittest.mock import patch
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
@ -25,7 +25,9 @@ from homeassistant.util import dt as dt_util
|
|||
from tests.common import async_mock_service
|
||||
|
||||
|
||||
async def test_async_track_states(hass, mock_integration_frame):
|
||||
async def test_async_track_states(
|
||||
hass: HomeAssistant, mock_integration_frame: Mock
|
||||
) -> None:
|
||||
"""Test AsyncTrackStates context manager."""
|
||||
point1 = dt_util.utcnow()
|
||||
point2 = point1 + timedelta(seconds=5)
|
||||
|
@ -82,7 +84,9 @@ async def test_call_to_component(hass: HomeAssistant) -> None:
|
|||
)
|
||||
|
||||
|
||||
async def test_get_changed_since(hass, mock_integration_frame):
|
||||
async def test_get_changed_since(
|
||||
hass: HomeAssistant, mock_integration_frame: Mock
|
||||
) -> None:
|
||||
"""Test get_changed_since."""
|
||||
point1 = dt_util.utcnow()
|
||||
point2 = point1 + timedelta(seconds=5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue