mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add strict typing to Vodafone Station (#139573)
This commit is contained in:
parent
91eba0855e
commit
679b57e450
@ -528,6 +528,7 @@ homeassistant.components.vallox.*
|
|||||||
homeassistant.components.valve.*
|
homeassistant.components.valve.*
|
||||||
homeassistant.components.velbus.*
|
homeassistant.components.velbus.*
|
||||||
homeassistant.components.vlc_telnet.*
|
homeassistant.components.vlc_telnet.*
|
||||||
|
homeassistant.components.vodafone_station.*
|
||||||
homeassistant.components.wake_on_lan.*
|
homeassistant.components.wake_on_lan.*
|
||||||
homeassistant.components.wake_word.*
|
homeassistant.components.wake_word.*
|
||||||
homeassistant.components.wallbox.*
|
homeassistant.components.wallbox.*
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from json.decoder import JSONDecodeError
|
from json.decoder import JSONDecodeError
|
||||||
from typing import Any
|
from typing import Any, cast
|
||||||
|
|
||||||
from aiovodafone import VodafoneStationDevice, VodafoneStationSercommApi, exceptions
|
from aiovodafone import VodafoneStationDevice, VodafoneStationSercommApi, exceptions
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ class VodafoneStationRouter(DataUpdateCoordinator[UpdateCoordinatorDataType]):
|
|||||||
@property
|
@property
|
||||||
def serial_number(self) -> str:
|
def serial_number(self) -> str:
|
||||||
"""Device serial number."""
|
"""Device serial number."""
|
||||||
return self.data.sensors["sys_serial_number"]
|
return cast(str, self.data.sensors["sys_serial_number"])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
|
10
mypy.ini
generated
10
mypy.ini
generated
@ -5039,6 +5039,16 @@ disallow_untyped_defs = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unreachable = true
|
warn_unreachable = true
|
||||||
|
|
||||||
|
[mypy-homeassistant.components.vodafone_station.*]
|
||||||
|
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.wake_on_lan.*]
|
[mypy-homeassistant.components.wake_on_lan.*]
|
||||||
check_untyped_defs = true
|
check_untyped_defs = true
|
||||||
disallow_incomplete_defs = true
|
disallow_incomplete_defs = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user