mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Upgrade ruff to 0.0.289 (#100238)
This commit is contained in:
parent
f2fac40019
commit
fa0b999d08
@ -1,6 +1,6 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.0.285
|
rev: v0.0.289
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args:
|
args:
|
||||||
|
@ -70,7 +70,7 @@ class DynaliteBase(RestoreEntity, ABC):
|
|||||||
)
|
)
|
||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Added to hass so need to restore state and register to dispatch."""
|
"""Handle addition to hass: restore state and register to dispatch."""
|
||||||
# register for device specific update
|
# register for device specific update
|
||||||
await super().async_added_to_hass()
|
await super().async_added_to_hass()
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ class IOSSensor(SensorEntity):
|
|||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Added to hass so need to register to dispatch."""
|
"""Handle addition to hass: register to dispatch."""
|
||||||
self._attr_native_value = self._device[ios.ATTR_BATTERY][
|
self._attr_native_value = self._device[ios.ATTR_BATTERY][
|
||||||
self.entity_description.key
|
self.entity_description.key
|
||||||
]
|
]
|
||||||
|
@ -34,7 +34,7 @@ class APICount(SensorEntity):
|
|||||||
self.count = 0
|
self.count = 0
|
||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Added to hass."""
|
"""Handle addition to hass."""
|
||||||
self.async_on_remove(
|
self.async_on_remove(
|
||||||
async_dispatcher_connect(
|
async_dispatcher_connect(
|
||||||
self.hass, SIGNAL_WEBSOCKET_CONNECTED, self._update_count
|
self.hass, SIGNAL_WEBSOCKET_CONNECTED, self._update_count
|
||||||
|
@ -289,6 +289,7 @@ disable = [
|
|||||||
"use-list-literal", # C405
|
"use-list-literal", # C405
|
||||||
"useless-object-inheritance", # UP004
|
"useless-object-inheritance", # UP004
|
||||||
"useless-return", # PLR1711
|
"useless-return", # PLR1711
|
||||||
|
"no-self-use", # PLR6301
|
||||||
|
|
||||||
# Handled by mypy
|
# Handled by mypy
|
||||||
# Ref: <https://github.com/antonagestam/pylint-mypy-overlap>
|
# Ref: <https://github.com/antonagestam/pylint-mypy-overlap>
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
black==23.9.1
|
black==23.9.1
|
||||||
codespell==2.2.2
|
codespell==2.2.2
|
||||||
ruff==0.0.285
|
ruff==0.0.289
|
||||||
yamllint==1.32.0
|
yamllint==1.32.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user