mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Enable strict typing in lookin (#58238)
This commit is contained in:
parent
d9b87ee5c5
commit
c7b4542624
@ -66,6 +66,7 @@ homeassistant.components.lcn.*
|
|||||||
homeassistant.components.light.*
|
homeassistant.components.light.*
|
||||||
homeassistant.components.local_ip.*
|
homeassistant.components.local_ip.*
|
||||||
homeassistant.components.lock.*
|
homeassistant.components.lock.*
|
||||||
|
homeassistant.components.lookin.*
|
||||||
homeassistant.components.mailbox.*
|
homeassistant.components.mailbox.*
|
||||||
homeassistant.components.media_player.*
|
homeassistant.components.media_player.*
|
||||||
homeassistant.components.modbus.*
|
homeassistant.components.modbus.*
|
||||||
|
@ -79,7 +79,9 @@ async def async_setup_entry(
|
|||||||
continue
|
continue
|
||||||
uuid = remote["UUID"]
|
uuid = remote["UUID"]
|
||||||
|
|
||||||
def _wrap_async_update(uuid) -> Callable[[], Coroutine[None, Any, Climate]]:
|
def _wrap_async_update(
|
||||||
|
uuid: str,
|
||||||
|
) -> Callable[[], Coroutine[None, Any, Climate]]:
|
||||||
"""Create a function to capture the uuid cell variable."""
|
"""Create a function to capture the uuid cell variable."""
|
||||||
|
|
||||||
async def _async_update() -> Climate:
|
async def _async_update() -> Climate:
|
||||||
|
@ -26,7 +26,7 @@ def _lookin_device_to_device_info(lookin_device: Device) -> DeviceInfo:
|
|||||||
|
|
||||||
|
|
||||||
def _lookin_controlled_device_to_device_info(
|
def _lookin_controlled_device_to_device_info(
|
||||||
lookin_device: Device, uuid: str, device: Device
|
lookin_device: Device, uuid: str, device: Climate | Remote
|
||||||
) -> DeviceInfo:
|
) -> DeviceInfo:
|
||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
identifiers={(DOMAIN, uuid)},
|
identifiers={(DOMAIN, uuid)},
|
||||||
|
11
mypy.ini
11
mypy.ini
@ -737,6 +737,17 @@ no_implicit_optional = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unreachable = true
|
warn_unreachable = true
|
||||||
|
|
||||||
|
[mypy-homeassistant.components.lookin.*]
|
||||||
|
check_untyped_defs = true
|
||||||
|
disallow_incomplete_defs = true
|
||||||
|
disallow_subclassing_any = true
|
||||||
|
disallow_untyped_calls = true
|
||||||
|
disallow_untyped_decorators = true
|
||||||
|
disallow_untyped_defs = true
|
||||||
|
no_implicit_optional = true
|
||||||
|
warn_return_any = true
|
||||||
|
warn_unreachable = true
|
||||||
|
|
||||||
[mypy-homeassistant.components.mailbox.*]
|
[mypy-homeassistant.components.mailbox.*]
|
||||||
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