mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Improve type hints in sma tests (#123889)
This commit is contained in:
parent
57902fed22
commit
f8879a51fe
@ -9,6 +9,7 @@ import pytest
|
|||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.sma.const import DOMAIN
|
from homeassistant.components.sma.const import DOMAIN
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
from . import MOCK_DEVICE, MOCK_USER_INPUT
|
from . import MOCK_DEVICE, MOCK_USER_INPUT
|
||||||
|
|
||||||
@ -16,7 +17,7 @@ from tests.common import MockConfigEntry
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_config_entry():
|
def mock_config_entry() -> MockConfigEntry:
|
||||||
"""Return the default mocked config entry."""
|
"""Return the default mocked config entry."""
|
||||||
return MockConfigEntry(
|
return MockConfigEntry(
|
||||||
domain=DOMAIN,
|
domain=DOMAIN,
|
||||||
@ -28,7 +29,9 @@ def mock_config_entry():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def init_integration(hass, mock_config_entry):
|
async def init_integration(
|
||||||
|
hass: HomeAssistant, mock_config_entry: MockConfigEntry
|
||||||
|
) -> MockConfigEntry:
|
||||||
"""Create a fake SMA Config Entry."""
|
"""Create a fake SMA Config Entry."""
|
||||||
mock_config_entry.add_to_hass(hass)
|
mock_config_entry.add_to_hass(hass)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user