mirror of https://github.com/home-assistant/core
Add Starlink to .strict-typing (#97598)
This commit is contained in:
parent
ac9ec6e402
commit
49b9dd2a4f
|
@ -296,6 +296,7 @@ homeassistant.components.sonarr.*
|
|||
homeassistant.components.speedtestdotnet.*
|
||||
homeassistant.components.sql.*
|
||||
homeassistant.components.ssdp.*
|
||||
homeassistant.components.starlink.*
|
||||
homeassistant.components.statistics.*
|
||||
homeassistant.components.steamist.*
|
||||
homeassistant.components.stookalert.*
|
||||
|
|
|
@ -44,6 +44,7 @@ class StarlinkConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
async def get_device_id(self, url: str) -> str | None:
|
||||
"""Get the device UID, or None if no device exists at the given URL."""
|
||||
context = ChannelContext(target=url)
|
||||
response: str | None
|
||||
try:
|
||||
response = await self.hass.async_add_executor_job(get_id, context)
|
||||
except GrpcError:
|
||||
|
|
|
@ -57,7 +57,7 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]):
|
|||
except GrpcError as exc:
|
||||
raise UpdateFailed from exc
|
||||
|
||||
async def async_stow_starlink(self, stow: bool):
|
||||
async def async_stow_starlink(self, stow: bool) -> None:
|
||||
"""Set whether Starlink system tied to this coordinator should be stowed."""
|
||||
async with async_timeout.timeout(4):
|
||||
try:
|
||||
|
@ -67,7 +67,7 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]):
|
|||
except GrpcError as exc:
|
||||
raise HomeAssistantError from exc
|
||||
|
||||
async def async_reboot_starlink(self):
|
||||
async def async_reboot_starlink(self) -> None:
|
||||
"""Reboot the Starlink system tied to this coordinator."""
|
||||
async with async_timeout.timeout(4):
|
||||
try:
|
||||
|
|
10
mypy.ini
10
mypy.ini
|
@ -2722,6 +2722,16 @@ disallow_untyped_defs = true
|
|||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
|
||||
[mypy-homeassistant.components.starlink.*]
|
||||
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.statistics.*]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
|
|
Loading…
Reference in New Issue