mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 01:21:51 +02:00
Update codespell to 2.4.1 (#137312)
This commit is contained in:
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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",
|
||||
|
2
requirements_test_pre_commit.txt
generated
2
requirements_test_pre_commit.txt
generated
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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={
|
||||
|
@ -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",
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user