mirror of
https://github.com/home-assistant/core.git
synced 2026-05-08 09:38:58 +01:00
Add missing hass type hint in component tests (h) (#124209)
* Add missing hass type hint in component tests (h) * Fix import
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Tests for the Heos Media Player platform."""
|
||||
|
||||
import asyncio
|
||||
from typing import Any
|
||||
|
||||
from pyheos import CommandFailedError, const
|
||||
from pyheos.error import HeosError
|
||||
@@ -58,8 +59,12 @@ from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
async def setup_platform(hass, config_entry, config):
|
||||
|
||||
async def setup_platform(
|
||||
hass: HomeAssistant, config_entry: MockConfigEntry, config: dict[str, Any]
|
||||
) -> None:
|
||||
"""Set up the media player platform for testing."""
|
||||
config_entry.add_to_hass(hass)
|
||||
assert await async_setup_component(hass, DOMAIN, config)
|
||||
|
||||
@@ -13,8 +13,10 @@ from homeassistant.components.heos.const import (
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
async def setup_component(hass, config_entry):
|
||||
|
||||
async def setup_component(hass: HomeAssistant, config_entry: MockConfigEntry) -> None:
|
||||
"""Set up the component for testing."""
|
||||
config_entry.add_to_hass(hass)
|
||||
assert await async_setup_component(hass, DOMAIN, {})
|
||||
|
||||
Reference in New Issue
Block a user