Enable strict typing in lookin (#58238)
This commit is contained in:
parent
d9b87ee5c5
commit
c7b4542624
4 changed files with 16 additions and 2 deletions
|
@ -66,6 +66,7 @@ homeassistant.components.lcn.*
|
|||
homeassistant.components.light.*
|
||||
homeassistant.components.local_ip.*
|
||||
homeassistant.components.lock.*
|
||||
homeassistant.components.lookin.*
|
||||
homeassistant.components.mailbox.*
|
||||
homeassistant.components.media_player.*
|
||||
homeassistant.components.modbus.*
|
||||
|
|
|
@ -79,7 +79,9 @@ async def async_setup_entry(
|
|||
continue
|
||||
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."""
|
||||
|
||||
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(
|
||||
lookin_device: Device, uuid: str, device: Device
|
||||
lookin_device: Device, uuid: str, device: Climate | Remote
|
||||
) -> DeviceInfo:
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, uuid)},
|
||||
|
|
11
mypy.ini
11
mypy.ini
|
@ -737,6 +737,17 @@ no_implicit_optional = true
|
|||
warn_return_any = 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.*]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
|
|
Loading…
Add table
Reference in a new issue