Activate mypy for synology_srm (#55059)
This commit is contained in:
parent
c2b2c8604f
commit
dae40530bd
3 changed files with 5 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Device tracker for Synology SRM routers."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
import synology_srm
|
||||
|
@ -6,7 +8,7 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components.device_tracker import (
|
||||
DOMAIN,
|
||||
PLATFORM_SCHEMA,
|
||||
PLATFORM_SCHEMA as DEVICE_TRACKER_PLATFORM_SCHEMA,
|
||||
DeviceScanner,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
|
@ -26,7 +28,7 @@ DEFAULT_PORT = 8001
|
|||
DEFAULT_SSL = True
|
||||
DEFAULT_VERIFY_SSL = False
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
PLATFORM_SCHEMA = DEVICE_TRACKER_PLATFORM_SCHEMA.extend(
|
||||
{
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
vol.Required(CONF_USERNAME, default=DEFAULT_USERNAME): cv.string,
|
||||
|
@ -106,7 +108,7 @@ class SynologySrmDeviceScanner(DeviceScanner):
|
|||
device = next(
|
||||
(result for result in self.devices if result["mac"] == device), None
|
||||
)
|
||||
filtered_attributes = {}
|
||||
filtered_attributes: dict[str, str] = {}
|
||||
if not device:
|
||||
return filtered_attributes
|
||||
for attribute, alias in ATTRIBUTE_ALIAS.items():
|
||||
|
|
3
mypy.ini
3
mypy.ini
|
@ -1607,9 +1607,6 @@ ignore_errors = true
|
|||
[mypy-homeassistant.components.switchbot.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.synology_srm.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.system_health.*]
|
||||
ignore_errors = true
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||
"homeassistant.components.stt.*",
|
||||
"homeassistant.components.surepetcare.*",
|
||||
"homeassistant.components.switchbot.*",
|
||||
"homeassistant.components.synology_srm.*",
|
||||
"homeassistant.components.system_health.*",
|
||||
"homeassistant.components.system_log.*",
|
||||
"homeassistant.components.tado.*",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue