diff --git a/.strict-typing b/.strict-typing index 13b2752e09c..2c193bb5173 100644 --- a/.strict-typing +++ b/.strict-typing @@ -285,6 +285,7 @@ homeassistant.components.websocket_api.* homeassistant.components.wemo.* homeassistant.components.whois.* homeassistant.components.wiz.* +homeassistant.components.wled.* homeassistant.components.worldclock.* homeassistant.components.yale_smart_alarm.* homeassistant.components.zeroconf.* diff --git a/homeassistant/components/wled/number.py b/homeassistant/components/wled/number.py index 33b27777c7e..60317003f19 100644 --- a/homeassistant/components/wled/number.py +++ b/homeassistant/components/wled/number.py @@ -92,7 +92,7 @@ class WLEDNumber(WLEDEntity, NumberEntity): @property def native_value(self) -> float | None: """Return the current WLED segment number value.""" - return getattr( + return getattr( # type: ignore[no-any-return] self.coordinator.data.state.segments[self._segment], self.entity_description.key, ) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 56700d017c3..38ff17b38c7 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -114,9 +114,8 @@ multidict>=6.0.2 # https://github.com/home-assistant/core/pull/68176 authlib<1.0 -# Pin backoff for compatibility until most libraries have been updated -# https://github.com/home-assistant/core/pull/70817 -backoff<2.0 +# Version 2.0 added typing, prevent accidental fallbacks +backoff>=2.0 # Breaking change in version # https://github.com/samuelcolvin/pydantic/issues/4092 diff --git a/mypy.ini b/mypy.ini index c83f6cd048e..b63931d6c79 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2604,6 +2604,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.wled.*] +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.worldclock.*] check_untyped_defs = true disallow_incomplete_defs = true diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index d0eb830f088..dc55b37b956 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -124,9 +124,8 @@ multidict>=6.0.2 # https://github.com/home-assistant/core/pull/68176 authlib<1.0 -# Pin backoff for compatibility until most libraries have been updated -# https://github.com/home-assistant/core/pull/70817 -backoff<2.0 +# Version 2.0 added typing, prevent accidental fallbacks +backoff>=2.0 # Breaking change in version # https://github.com/samuelcolvin/pydantic/issues/4092