Enable strict typing in lookin (#58238)

This commit is contained in:
J. Nick Koston 2021-10-22 08:14:33 -10:00 committed by GitHub
parent d9b87ee5c5
commit c7b4542624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 2 deletions

View File

@ -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.*

View File

@ -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:

View File

@ -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)},

View File

@ -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