Remove sma from mypy ignore list (#64510)
parent
03bf2cdd56
commit
e248ef1dd7
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pysma
|
||||
|
||||
|
@ -58,6 +59,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
) as exc:
|
||||
raise ConfigEntryNotReady from exc
|
||||
|
||||
if TYPE_CHECKING:
|
||||
assert entry.unique_id
|
||||
|
||||
# Create DeviceInfo object from sma_device_info
|
||||
device_info = DeviceInfo(
|
||||
configuration_url=url,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
"""SMA Solar Webconnect interface."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pysma
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
|
@ -34,6 +36,9 @@ async def async_setup_entry(
|
|||
used_sensors = sma_data[PYSMA_SENSORS]
|
||||
device_info = sma_data[PYSMA_DEVICE_INFO]
|
||||
|
||||
if TYPE_CHECKING:
|
||||
assert config_entry.unique_id
|
||||
|
||||
entities = []
|
||||
for sensor in used_sensors:
|
||||
entities.append(
|
||||
|
|
3
mypy.ini
3
mypy.ini
|
@ -2197,9 +2197,6 @@ ignore_errors = true
|
|||
[mypy-homeassistant.components.sharkiq.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.sma.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.smartthings.*]
|
||||
ignore_errors = true
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||
"homeassistant.components.search.*",
|
||||
"homeassistant.components.sense.*",
|
||||
"homeassistant.components.sharkiq.*",
|
||||
"homeassistant.components.sma.*",
|
||||
"homeassistant.components.smartthings.*",
|
||||
"homeassistant.components.solaredge.*",
|
||||
"homeassistant.components.sonos.*",
|
||||
|
|
Loading…
Reference in New Issue