Add missing hass type hint in component tests (t) (#124274)
This commit is contained in:
parent
14775c822f
commit
3dc83ef19d
18 changed files with 186 additions and 126 deletions
|
@ -5,7 +5,8 @@ from unittest.mock import patch
|
|||
from total_connect_client import ArmingState, ResultCode, ZoneStatus, ZoneType
|
||||
|
||||
from homeassistant.components.totalconnect.const import CONF_USERCODES, DOMAIN
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
@ -394,7 +395,7 @@ TOTALCONNECT_REQUEST = (
|
|||
)
|
||||
|
||||
|
||||
async def setup_platform(hass, platform):
|
||||
async def setup_platform(hass: HomeAssistant, platform: Platform) -> MockConfigEntry:
|
||||
"""Set up the TotalConnect platform."""
|
||||
# first set up a config entry and add it to hass
|
||||
mock_entry = MockConfigEntry(domain=DOMAIN, data=CONFIG_DATA)
|
||||
|
@ -422,7 +423,7 @@ async def setup_platform(hass, platform):
|
|||
return mock_entry
|
||||
|
||||
|
||||
async def init_integration(hass):
|
||||
async def init_integration(hass: HomeAssistant) -> MockConfigEntry:
|
||||
"""Set up the TotalConnect integration."""
|
||||
# first set up a config entry and add it to hass
|
||||
mock_entry = MockConfigEntry(domain=DOMAIN, data=CONFIG_DATA)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue