1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-18 07:56:03 +01:00

Enable strict typing in Velux integration (#163798)

This commit is contained in:
wollew
2026-02-23 18:05:50 +01:00
committed by GitHub
parent 3a27fa782e
commit fa38f25d4f
5 changed files with 15 additions and 4 deletions

View File

@@ -583,6 +583,7 @@ homeassistant.components.vacuum.*
homeassistant.components.vallox.*
homeassistant.components.valve.*
homeassistant.components.velbus.*
homeassistant.components.velux.*
homeassistant.components.vivotek.*
homeassistant.components.vlc_telnet.*
homeassistant.components.vodafone_station.*

View File

@@ -11,7 +11,7 @@ from homeassistant.const import (
CONF_PASSWORD,
EVENT_HOMEASSISTANT_STOP,
)
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.core import Event, HomeAssistant, ServiceCall
from homeassistant.exceptions import (
ConfigEntryAuthFailed,
ConfigEntryNotReady,
@@ -127,7 +127,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: VeluxConfigEntry) -> boo
connections=connections,
)
async def on_hass_stop(event):
async def on_hass_stop(_: Event) -> None:
"""Close connection when hass stops."""
LOGGER.debug("Velux interface terminated")
await pyvlx.disconnect()

View File

@@ -70,7 +70,7 @@ class VeluxEntity(Entity):
via_device=(DOMAIN, f"gateway_{config_entry_id}"),
)
async def after_update_callback(self, node) -> None:
async def after_update_callback(self, _: Node) -> None:
"""Call after device was updated."""
self._attr_available = self.node.pyvlx.get_connected()
if not self._attr_available:

View File

@@ -57,4 +57,4 @@ rules:
# Platinum
async-dependency: todo
inject-websession: todo
strict-typing: todo
strict-typing: done

10
mypy.ini generated
View File

@@ -5589,6 +5589,16 @@ disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.velux.*]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.vivotek.*]
check_untyped_defs = true
disallow_incomplete_defs = true