Update codespell to 2.4.1 (#137312)

This commit is contained in:
Marc Mueller 2025-02-04 12:16:24 +01:00 committed by GitHub
parent 43b034b8bb
commit 30c0a1492c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 16 additions and 16 deletions

View File

@ -8,7 +8,7 @@ repos:
- id: ruff-format - id: ruff-format
files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.(py|pyi)$ files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.(py|pyi)$
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: v2.3.0 rev: v2.4.1
hooks: hooks:
- id: codespell - id: codespell
args: args:

View File

@ -134,7 +134,7 @@ class AppleTVConfigFlow(ConfigFlow, domain=DOMAIN):
unique_id for said entry. When a new (zeroconf) service or device is unique_id for said entry. When a new (zeroconf) service or device is
discovered, the identifier is first used to look up if it belongs to an discovered, the identifier is first used to look up if it belongs to an
existing config entry. If that's the case, the unique_id from that entry is existing config entry. If that's the case, the unique_id from that entry is
re-used, otherwise the newly discovered identifier is used instead. reused, otherwise the newly discovered identifier is used instead.
""" """
assert self.atv assert self.atv
all_identifiers = set(self.atv.all_identifiers) all_identifiers = set(self.atv.all_identifiers)

View File

@ -3,7 +3,7 @@
Data is fetched from DWD: Data is fetched from DWD:
https://rcccm.dwd.de/DE/wetter/warnungen_aktuell/objekt_einbindung/objekteinbindung.html https://rcccm.dwd.de/DE/wetter/warnungen_aktuell/objekt_einbindung/objekteinbindung.html
Warnungen vor extremem Unwetter (Stufe 4) # codespell:ignore vor Warnungen vor extremem Unwetter (Stufe 4) # codespell:ignore vor,extremem
Unwetterwarnungen (Stufe 3) Unwetterwarnungen (Stufe 3)
Warnungen vor markantem Wetter (Stufe 2) # codespell:ignore vor Warnungen vor markantem Wetter (Stufe 2) # codespell:ignore vor
Wetterwarnungen (Stufe 1) Wetterwarnungen (Stufe 1)

View File

@ -408,7 +408,7 @@ class HueLight(CoordinatorEntity, LightEntity):
if self._fixed_color_mode: if self._fixed_color_mode:
return self._fixed_color_mode return self._fixed_color_mode
# The light supports both hs/xy and white with adjustabe color_temperature # The light supports both hs/xy and white with adjustable color_temperature
mode = self._color_mode mode = self._color_mode
if mode in ("xy", "hs"): if mode in ("xy", "hs"):
return ColorMode.HS return ColorMode.HS

View File

@ -73,7 +73,7 @@ ISY_CONTROL_TO_DEVICE_CLASS = {
"CV": SensorDeviceClass.VOLTAGE, "CV": SensorDeviceClass.VOLTAGE,
"DEWPT": SensorDeviceClass.TEMPERATURE, "DEWPT": SensorDeviceClass.TEMPERATURE,
"DISTANC": SensorDeviceClass.DISTANCE, "DISTANC": SensorDeviceClass.DISTANCE,
"ETO": SensorDeviceClass.PRECIPITATION_INTENSITY, "ETO": SensorDeviceClass.PRECIPITATION_INTENSITY, # codespell:ignore eto
"FATM": SensorDeviceClass.WEIGHT, "FATM": SensorDeviceClass.WEIGHT,
"FREQ": SensorDeviceClass.FREQUENCY, "FREQ": SensorDeviceClass.FREQUENCY,
"MUSCLEM": SensorDeviceClass.WEIGHT, "MUSCLEM": SensorDeviceClass.WEIGHT,

View File

@ -101,7 +101,7 @@ def entity_class_for_type(entity_type):
entity_device_mapping = { entity_device_mapping = {
# sends only 'dim' commands not compatible with on/off switches # sends only 'dim' commands not compatible with on/off switches
TYPE_DIMMABLE: DimmableRflinkLight, TYPE_DIMMABLE: DimmableRflinkLight,
# sends only 'on/off' commands not advices with dimmers and signal # sends only 'on/off' commands not advised with dimmers and signal
# repetition # repetition
TYPE_SWITCHABLE: RflinkLight, TYPE_SWITCHABLE: RflinkLight,
# sends 'dim' and 'on' command to support both dimmers and on/off # sends 'dim' and 'on' command to support both dimmers and on/off

View File

@ -45,7 +45,7 @@ class TuyaSensorEntityDescription(SensorEntityDescription):
subkey: str | None = None subkey: str | None = None
# Commonly used battery sensors, that are re-used in the sensors down below. # Commonly used battery sensors, that are reused in the sensors down below.
BATTERY_SENSORS: tuple[TuyaSensorEntityDescription, ...] = ( BATTERY_SENSORS: tuple[TuyaSensorEntityDescription, ...] = (
TuyaSensorEntityDescription( TuyaSensorEntityDescription(
key=DPCode.BATTERY_PERCENTAGE, key=DPCode.BATTERY_PERCENTAGE,

View File

@ -140,7 +140,7 @@ class HassEnforceClassModule(BaseChecker):
for ancestor in top_level_ancestors: for ancestor in top_level_ancestors:
if ancestor.name in _BASE_ENTITY_MODULES and not any( if ancestor.name in _BASE_ENTITY_MODULES and not any(
anc.name in _MODULE_CLASSES for anc in ancestors parent.name in _MODULE_CLASSES for parent in ancestors
): ):
self.add_message( self.add_message(
"hass-enforce-class-module", "hass-enforce-class-module",

View File

@ -1,5 +1,5 @@
# Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit # Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit
codespell==2.3.0 codespell==2.4.1
ruff==0.9.1 ruff==0.9.1
yamllint==1.35.1 yamllint==1.35.1

View File

@ -215,7 +215,7 @@ async def test_see_device_if_time_updated(hass: HomeAssistant) -> None:
@pytest.mark.usefixtures("mock_bluetooth", "mock_device_tracker_conf") @pytest.mark.usefixtures("mock_bluetooth", "mock_device_tracker_conf")
async def test_preserve_new_tracked_device_name(hass: HomeAssistant) -> None: async def test_preserve_new_tracked_device_name(hass: HomeAssistant) -> None:
"""Test preserving tracked device name across new seens.""" """Test preserving tracked device name across new seens.""" # codespell:ignore seens
address = "DE:AD:BE:EF:13:37" address = "DE:AD:BE:EF:13:37"
name = "Mock device name" name = "Mock device name"

View File

@ -439,7 +439,7 @@ async def test_zero_conf_old_blank_entry(
mock_setup_entry: AsyncMock, mock_setup_entry: AsyncMock,
mock_envoy: AsyncMock, mock_envoy: AsyncMock,
) -> None: ) -> None:
"""Test re-using old blank entry.""" """Test reusing old blank entry."""
entry = MockConfigEntry( entry = MockConfigEntry(
domain=DOMAIN, domain=DOMAIN,
data={ data={
@ -478,7 +478,7 @@ async def test_zero_conf_old_blank_entry_standard_title(
mock_setup_entry: AsyncMock, mock_setup_entry: AsyncMock,
mock_envoy: AsyncMock, mock_envoy: AsyncMock,
) -> None: ) -> None:
"""Test re-using old blank entry was Envoy as title.""" """Test reusing old blank entry was Envoy as title."""
entry = MockConfigEntry( entry = MockConfigEntry(
domain=DOMAIN, domain=DOMAIN,
data={ data={
@ -519,7 +519,7 @@ async def test_zero_conf_old_blank_entry_user_title(
mock_setup_entry: AsyncMock, mock_setup_entry: AsyncMock,
mock_envoy: AsyncMock, mock_envoy: AsyncMock,
) -> None: ) -> None:
"""Test re-using old blank entry with user title.""" """Test reusing old blank entry with user title."""
entry = MockConfigEntry( entry = MockConfigEntry(
domain=DOMAIN, domain=DOMAIN,
data={ data={

View File

@ -392,7 +392,7 @@ async def test_light_availability(
assert test_light is not None assert test_light is not None
assert test_light.state == "on" assert test_light.state == "on"
# Change availability by modififying the zigbee_connectivity status # Change availability by modifying the zigbee_connectivity status
for status in ("connectivity_issue", "disconnected", "connected"): for status in ("connectivity_issue", "disconnected", "connected"):
mock_bridge_v2.api.emit_event( mock_bridge_v2.api.emit_event(
"update", "update",

View File

@ -52,7 +52,7 @@ async def test_canceling_debouncer_on_shutdown(
assert not mock_debouncer.is_set() assert not mock_debouncer.is_set()
mqtt_client_mock.subscribe.assert_not_called() mqtt_client_mock.subscribe.assert_not_called()
# Note thet the broker connection will not be disconnected gracefully # Note that the broker connection will not be disconnected gracefully
await hass.async_block_till_done() await hass.async_block_till_done()
async_fire_time_changed(hass, utcnow() + timedelta(seconds=5)) async_fire_time_changed(hass, utcnow() + timedelta(seconds=5))
await asyncio.sleep(0) await asyncio.sleep(0)

View File

@ -174,7 +174,7 @@ def validate_common_camera_state(
entity_id: str, entity_id: str,
features: int = CameraEntityFeature.STREAM, features: int = CameraEntityFeature.STREAM,
): ):
"""Validate state that is common to all camera entity, regradless of type.""" """Validate state that is common to all camera entity, regardless of type."""
entity_state = hass.states.get(entity_id) entity_state = hass.states.get(entity_id)
assert entity_state assert entity_state
assert entity_state.attributes[ATTR_ATTRIBUTION] == DEFAULT_ATTRIBUTION assert entity_state.attributes[ATTR_ATTRIBUTION] == DEFAULT_ATTRIBUTION