mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
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.speedtestdotnet.*
|
||||||
homeassistant.components.sql.*
|
homeassistant.components.sql.*
|
||||||
homeassistant.components.ssdp.*
|
homeassistant.components.ssdp.*
|
||||||
|
homeassistant.components.starlink.*
|
||||||
homeassistant.components.statistics.*
|
homeassistant.components.statistics.*
|
||||||
homeassistant.components.steamist.*
|
homeassistant.components.steamist.*
|
||||||
homeassistant.components.stookalert.*
|
homeassistant.components.stookalert.*
|
||||||
|
@ -44,6 +44,7 @@ class StarlinkConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
async def get_device_id(self, url: str) -> str | None:
|
async def get_device_id(self, url: str) -> str | None:
|
||||||
"""Get the device UID, or None if no device exists at the given URL."""
|
"""Get the device UID, or None if no device exists at the given URL."""
|
||||||
context = ChannelContext(target=url)
|
context = ChannelContext(target=url)
|
||||||
|
response: str | None
|
||||||
try:
|
try:
|
||||||
response = await self.hass.async_add_executor_job(get_id, context)
|
response = await self.hass.async_add_executor_job(get_id, context)
|
||||||
except GrpcError:
|
except GrpcError:
|
||||||
|
@ -57,7 +57,7 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]):
|
|||||||
except GrpcError as exc:
|
except GrpcError as exc:
|
||||||
raise UpdateFailed from 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."""
|
"""Set whether Starlink system tied to this coordinator should be stowed."""
|
||||||
async with async_timeout.timeout(4):
|
async with async_timeout.timeout(4):
|
||||||
try:
|
try:
|
||||||
@ -67,7 +67,7 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]):
|
|||||||
except GrpcError as exc:
|
except GrpcError as exc:
|
||||||
raise HomeAssistantError from 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."""
|
"""Reboot the Starlink system tied to this coordinator."""
|
||||||
async with async_timeout.timeout(4):
|
async with async_timeout.timeout(4):
|
||||||
try:
|
try:
|
||||||
|
10
mypy.ini
10
mypy.ini
@ -2722,6 +2722,16 @@ disallow_untyped_defs = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unreachable = 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.*]
|
[mypy-homeassistant.components.statistics.*]
|
||||||
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