From 5a39503accf0bba03d62d22a591d9b91d3371e6f Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 7 Jan 2024 10:41:54 +0100 Subject: [PATCH] Enable strict typing for led_ble (#107437) --- .strict-typing | 1 + homeassistant/components/led_ble/__init__.py | 2 +- mypy.ini | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.strict-typing b/.strict-typing index f01c3541b0e2..8134581fb5d6 100644 --- a/.strict-typing +++ b/.strict-typing @@ -242,6 +242,7 @@ homeassistant.components.laundrify.* homeassistant.components.lawn_mower.* homeassistant.components.lcn.* homeassistant.components.ld2410_ble.* +homeassistant.components.led_ble.* homeassistant.components.lidarr.* homeassistant.components.lifx.* homeassistant.components.light.* diff --git a/homeassistant/components/led_ble/__init__.py b/homeassistant/components/led_ble/__init__.py index 1bdb8bf8ec9f..70b77ba67872 100644 --- a/homeassistant/components/led_ble/__init__.py +++ b/homeassistant/components/led_ble/__init__.py @@ -53,7 +53,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ) ) - async def _async_update(): + async def _async_update() -> None: """Update the device state.""" try: await led_ble.update() diff --git a/mypy.ini b/mypy.ini index 44cd6af98b01..c670e7b1c5e0 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2181,6 +2181,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.led_ble.*] +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.lidarr.*] check_untyped_defs = true disallow_incomplete_defs = true