mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Add strict typing for WLED (#79822)
* Add strict typing for WLED * Update backoff constraint
This commit is contained in:
parent
14d2bbfcd6
commit
33c94b0052
@ -285,6 +285,7 @@ homeassistant.components.websocket_api.*
|
|||||||
homeassistant.components.wemo.*
|
homeassistant.components.wemo.*
|
||||||
homeassistant.components.whois.*
|
homeassistant.components.whois.*
|
||||||
homeassistant.components.wiz.*
|
homeassistant.components.wiz.*
|
||||||
|
homeassistant.components.wled.*
|
||||||
homeassistant.components.worldclock.*
|
homeassistant.components.worldclock.*
|
||||||
homeassistant.components.yale_smart_alarm.*
|
homeassistant.components.yale_smart_alarm.*
|
||||||
homeassistant.components.zeroconf.*
|
homeassistant.components.zeroconf.*
|
||||||
|
@ -92,7 +92,7 @@ class WLEDNumber(WLEDEntity, NumberEntity):
|
|||||||
@property
|
@property
|
||||||
def native_value(self) -> float | None:
|
def native_value(self) -> float | None:
|
||||||
"""Return the current WLED segment number value."""
|
"""Return the current WLED segment number value."""
|
||||||
return getattr(
|
return getattr( # type: ignore[no-any-return]
|
||||||
self.coordinator.data.state.segments[self._segment],
|
self.coordinator.data.state.segments[self._segment],
|
||||||
self.entity_description.key,
|
self.entity_description.key,
|
||||||
)
|
)
|
||||||
|
@ -114,9 +114,8 @@ multidict>=6.0.2
|
|||||||
# https://github.com/home-assistant/core/pull/68176
|
# https://github.com/home-assistant/core/pull/68176
|
||||||
authlib<1.0
|
authlib<1.0
|
||||||
|
|
||||||
# Pin backoff for compatibility until most libraries have been updated
|
# Version 2.0 added typing, prevent accidental fallbacks
|
||||||
# https://github.com/home-assistant/core/pull/70817
|
backoff>=2.0
|
||||||
backoff<2.0
|
|
||||||
|
|
||||||
# Breaking change in version
|
# Breaking change in version
|
||||||
# https://github.com/samuelcolvin/pydantic/issues/4092
|
# https://github.com/samuelcolvin/pydantic/issues/4092
|
||||||
|
10
mypy.ini
10
mypy.ini
@ -2604,6 +2604,16 @@ disallow_untyped_defs = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unreachable = 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.*]
|
[mypy-homeassistant.components.worldclock.*]
|
||||||
check_untyped_defs = true
|
check_untyped_defs = true
|
||||||
disallow_incomplete_defs = true
|
disallow_incomplete_defs = true
|
||||||
|
@ -124,9 +124,8 @@ multidict>=6.0.2
|
|||||||
# https://github.com/home-assistant/core/pull/68176
|
# https://github.com/home-assistant/core/pull/68176
|
||||||
authlib<1.0
|
authlib<1.0
|
||||||
|
|
||||||
# Pin backoff for compatibility until most libraries have been updated
|
# Version 2.0 added typing, prevent accidental fallbacks
|
||||||
# https://github.com/home-assistant/core/pull/70817
|
backoff>=2.0
|
||||||
backoff<2.0
|
|
||||||
|
|
||||||
# Breaking change in version
|
# Breaking change in version
|
||||||
# https://github.com/samuelcolvin/pydantic/issues/4092
|
# https://github.com/samuelcolvin/pydantic/issues/4092
|
||||||
|
Loading…
x
Reference in New Issue
Block a user