From 30c0a1492cc60780d36eae7d063f9a8cd8dfc400 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 4 Feb 2025 12:16:24 +0100 Subject: [PATCH] Update codespell to 2.4.1 (#137312) --- .pre-commit-config.yaml | 2 +- homeassistant/components/apple_tv/config_flow.py | 2 +- homeassistant/components/dwd_weather_warnings/sensor.py | 2 +- homeassistant/components/hue/v1/light.py | 2 +- homeassistant/components/isy994/sensor.py | 2 +- homeassistant/components/rflink/light.py | 2 +- homeassistant/components/tuya/sensor.py | 2 +- pylint/plugins/hass_enforce_class_module.py | 2 +- requirements_test_pre_commit.txt | 2 +- .../components/bluetooth_le_tracker/test_device_tracker.py | 2 +- tests/components/enphase_envoy/test_config_flow.py | 6 +++--- tests/components/hue/test_light_v2.py | 2 +- tests/components/mqtt/test_util.py | 2 +- tests/components/unifiprotect/test_camera.py | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 805e3ac4dbd..a059710d3d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: ruff-format files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.(py|pyi)$ - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell args: diff --git a/homeassistant/components/apple_tv/config_flow.py b/homeassistant/components/apple_tv/config_flow.py index 5c317755d05..76c4681a30d 100644 --- a/homeassistant/components/apple_tv/config_flow.py +++ b/homeassistant/components/apple_tv/config_flow.py @@ -134,7 +134,7 @@ class AppleTVConfigFlow(ConfigFlow, domain=DOMAIN): 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 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 all_identifiers = set(self.atv.all_identifiers) diff --git a/homeassistant/components/dwd_weather_warnings/sensor.py b/homeassistant/components/dwd_weather_warnings/sensor.py index c6aa5727b74..0aaf1f2a801 100644 --- a/homeassistant/components/dwd_weather_warnings/sensor.py +++ b/homeassistant/components/dwd_weather_warnings/sensor.py @@ -3,7 +3,7 @@ Data is fetched from DWD: 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) Warnungen vor markantem Wetter (Stufe 2) # codespell:ignore vor Wetterwarnungen (Stufe 1) diff --git a/homeassistant/components/hue/v1/light.py b/homeassistant/components/hue/v1/light.py index e9669d226f0..33b99a7895b 100644 --- a/homeassistant/components/hue/v1/light.py +++ b/homeassistant/components/hue/v1/light.py @@ -408,7 +408,7 @@ class HueLight(CoordinatorEntity, LightEntity): if 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 if mode in ("xy", "hs"): return ColorMode.HS diff --git a/homeassistant/components/isy994/sensor.py b/homeassistant/components/isy994/sensor.py index 789075e5c57..58ba3171bc8 100644 --- a/homeassistant/components/isy994/sensor.py +++ b/homeassistant/components/isy994/sensor.py @@ -73,7 +73,7 @@ ISY_CONTROL_TO_DEVICE_CLASS = { "CV": SensorDeviceClass.VOLTAGE, "DEWPT": SensorDeviceClass.TEMPERATURE, "DISTANC": SensorDeviceClass.DISTANCE, - "ETO": SensorDeviceClass.PRECIPITATION_INTENSITY, + "ETO": SensorDeviceClass.PRECIPITATION_INTENSITY, # codespell:ignore eto "FATM": SensorDeviceClass.WEIGHT, "FREQ": SensorDeviceClass.FREQUENCY, "MUSCLEM": SensorDeviceClass.WEIGHT, diff --git a/homeassistant/components/rflink/light.py b/homeassistant/components/rflink/light.py index 2a5b1ccf8d7..af8d2c76844 100644 --- a/homeassistant/components/rflink/light.py +++ b/homeassistant/components/rflink/light.py @@ -101,7 +101,7 @@ def entity_class_for_type(entity_type): entity_device_mapping = { # sends only 'dim' commands not compatible with on/off switches 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 TYPE_SWITCHABLE: RflinkLight, # sends 'dim' and 'on' command to support both dimmers and on/off diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index f766c744998..756564c6a03 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -45,7 +45,7 @@ class TuyaSensorEntityDescription(SensorEntityDescription): 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, ...] = ( TuyaSensorEntityDescription( key=DPCode.BATTERY_PERCENTAGE, diff --git a/pylint/plugins/hass_enforce_class_module.py b/pylint/plugins/hass_enforce_class_module.py index 09fe61b68c6..cc7b33d9946 100644 --- a/pylint/plugins/hass_enforce_class_module.py +++ b/pylint/plugins/hass_enforce_class_module.py @@ -140,7 +140,7 @@ class HassEnforceClassModule(BaseChecker): for ancestor in top_level_ancestors: 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( "hass-enforce-class-module", diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index 4dd3bc46010..1cf3d91defa 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -1,5 +1,5 @@ # 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 yamllint==1.35.1 diff --git a/tests/components/bluetooth_le_tracker/test_device_tracker.py b/tests/components/bluetooth_le_tracker/test_device_tracker.py index da90980640b..738cae90c22 100644 --- a/tests/components/bluetooth_le_tracker/test_device_tracker.py +++ b/tests/components/bluetooth_le_tracker/test_device_tracker.py @@ -215,7 +215,7 @@ async def test_see_device_if_time_updated(hass: HomeAssistant) -> None: @pytest.mark.usefixtures("mock_bluetooth", "mock_device_tracker_conf") 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" name = "Mock device name" diff --git a/tests/components/enphase_envoy/test_config_flow.py b/tests/components/enphase_envoy/test_config_flow.py index a3da14b3835..efbe6da9b13 100644 --- a/tests/components/enphase_envoy/test_config_flow.py +++ b/tests/components/enphase_envoy/test_config_flow.py @@ -439,7 +439,7 @@ async def test_zero_conf_old_blank_entry( mock_setup_entry: AsyncMock, mock_envoy: AsyncMock, ) -> None: - """Test re-using old blank entry.""" + """Test reusing old blank entry.""" entry = MockConfigEntry( domain=DOMAIN, data={ @@ -478,7 +478,7 @@ async def test_zero_conf_old_blank_entry_standard_title( mock_setup_entry: AsyncMock, mock_envoy: AsyncMock, ) -> None: - """Test re-using old blank entry was Envoy as title.""" + """Test reusing old blank entry was Envoy as title.""" entry = MockConfigEntry( domain=DOMAIN, data={ @@ -519,7 +519,7 @@ async def test_zero_conf_old_blank_entry_user_title( mock_setup_entry: AsyncMock, mock_envoy: AsyncMock, ) -> None: - """Test re-using old blank entry with user title.""" + """Test reusing old blank entry with user title.""" entry = MockConfigEntry( domain=DOMAIN, data={ diff --git a/tests/components/hue/test_light_v2.py b/tests/components/hue/test_light_v2.py index 2b978ffc33f..c831d40d261 100644 --- a/tests/components/hue/test_light_v2.py +++ b/tests/components/hue/test_light_v2.py @@ -392,7 +392,7 @@ async def test_light_availability( assert test_light is not None 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"): mock_bridge_v2.api.emit_event( "update", diff --git a/tests/components/mqtt/test_util.py b/tests/components/mqtt/test_util.py index df91764b0fb..f751096bca2 100644 --- a/tests/components/mqtt/test_util.py +++ b/tests/components/mqtt/test_util.py @@ -52,7 +52,7 @@ async def test_canceling_debouncer_on_shutdown( assert not mock_debouncer.is_set() 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() async_fire_time_changed(hass, utcnow() + timedelta(seconds=5)) await asyncio.sleep(0) diff --git a/tests/components/unifiprotect/test_camera.py b/tests/components/unifiprotect/test_camera.py index 12b92beedd0..975e93edf09 100644 --- a/tests/components/unifiprotect/test_camera.py +++ b/tests/components/unifiprotect/test_camera.py @@ -174,7 +174,7 @@ def validate_common_camera_state( entity_id: str, 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) assert entity_state assert entity_state.attributes[ATTR_ATTRIBUTION] == DEFAULT_ATTRIBUTION