Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ repos:
- id: ruff-format
files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.(py|pyi)$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args:
- --ignore-words-list=additionals,alle,alot,astroid,bund,caf,convencional,currenty,datas,farenheit,falsy,fo,frequence,haa,hass,iif,incomfort,ines,ist,nam,nd,pres,pullrequests,resset,rime,ser,serie,te,technik,ue,unsecure,vor,withing,zar
- --ignore-words-list=additionals,alle,alot,astroid,bund,caf,checkin,convencional,currenty,datas,farenheit,falsy,fo,frequence,haa,hass,iif,incomfort,ines,ist,lookin,nam,nd,NotIn,pres,pullrequests,resset,rime,ser,serie,te,technik,ue,unsecure,vor,withing,zar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update the list in a followup to use inline ignores where appropriate.

- --skip="./.*,*.csv,*.json,*.ambr"
- --quiet-level=2
exclude_types: [csv, json, html]
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/coinbase/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
"TRAC": "TRAC",
"TRB": "TRB",
"TRIBE": "TRIBE",
"TRU": "TRU",
"TRU": "TRU", # codespell:ignore tru
"TRY": "TRY",
"TTD": "TTD",
"TWD": "TWD",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(
# A list of callbacks that turn HK characteristics into entities
self.char_factories: list[AddCharacteristicCb] = []

# The platorms we have forwarded the config entry so far. If a new
# The platforms we have forwarded the config entry so far. If a new
# accessory is added to a bridge we may have to load additional
# platforms. We don't want to load all platforms up front if its just
# a lightbulb. And we don't want to forward a config entry twice
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/isy994/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ async def async_added_to_hass(self) -> None:

self._node.control_events.subscribe(self._heartbeat_node_control_handler)

# Start the timer on bootup, so we can change from UNKNOWN to OFF
# Start the timer on boot-up, so we can change from UNKNOWN to OFF
self._restart_timer()

if (last_state := await self.async_get_last_state()) is not None:
Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/jewish_calendar/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ async def async_update(self) -> None:
daytime_date = HDate(today, diaspora=self._diaspora, hebrew=self._hebrew)

# The Jewish day starts after darkness (called "tzais") and finishes at
# sunset ("shkia"). The time in between is a gray area (aka "Bein
# Hashmashot" - literally: "in between the sun and the moon").
# sunset ("shkia"). The time in between is a gray area
# (aka "Bein Hashmashot" # codespell:ignore
# - literally: "in between the sun and the moon").

# For some sensors, it is more interesting to consider the date to be
# tomorrow based on sunset ("shkia"), for others based on "tzais".
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/systemmonitor/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def async_setup_entry(
entry: SystemMonitorConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up System Montor binary sensors based on a config entry."""
"""Set up System Monitor binary sensors based on a config entry."""
coordinator = entry.runtime_data.coordinator

async_add_entities(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/systemmonitor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ async def async_setup_entry(
entry: SystemMonitorConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up System Montor sensors based on a config entry."""
"""Set up System Monitor sensors based on a config entry."""
entities: list[SystemMonitorSensor] = []
legacy_resources: set[str] = set(entry.options.get("resources", []))
loaded_resources: set[str] = set()
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/transmission/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Config flow for Transmission Bittorent Client."""
"""Config flow for Transmission Bittorrent Client."""

from __future__ import annotations

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/transmission/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Constants for the Transmission Bittorent Client component."""
"""Constants for the Transmission Bittorrent Client component."""

from __future__ import annotations

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ filterwarnings = [
# https://github.com/tomaszsluszniak/sanix_py/blob/v1.0.6/sanix/__init__.py#L42
"ignore:invalid escape sequence:SyntaxWarning:.*sanix",
# https://pypi.org/project/sleekxmppfs/ - v1.4.1 - 2022-08-18
"ignore:invalid escape sequence:SyntaxWarning:.*sleekxmppfs.thirdparty.mini_dateutil",
"ignore:invalid escape sequence:SyntaxWarning:.*sleekxmppfs.thirdparty.mini_dateutil", # codespell:ignore thirdparty
# https://pypi.org/project/vobject/ - v0.9.7 - 2024-03-25
# https://github.com/py-vobject/vobject
"ignore:invalid escape sequence:SyntaxWarning:.*vobject.base",
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_pre_commit.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit

codespell==2.2.6
codespell==2.3.0
ruff==0.4.5
yamllint==1.35.1
2 changes: 1 addition & 1 deletion script/lint_and_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def async_exec(*args, display=False):
raise

if not display:
# Readin stdout into log
# Reading stdout into log
stdout, _ = await proc.communicate()
else:
# read child's stdout/stderr concurrently (capture and display)
Expand Down
2 changes: 1 addition & 1 deletion script/translations/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def run():
key_data = lokalise.keys_list({"filter_keys": ",".join(chunk), "limit": 1000})
if len(key_data) != len(chunk):
print(
f"Lookin up key in Lokalise returns {len(key_data)} results, expected {len(chunk)}"
f"Looking up key in Lokalise returns {len(key_data)} results, expected {len(chunk)}"
)

if not key_data:
Expand Down
4 changes: 2 additions & 2 deletions script/translations/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def rename_keys(project_id, to_migrate):
from_key_data = lokalise.keys_list({"filter_keys": ",".join(to_migrate)})
if len(from_key_data) != len(to_migrate):
print(
f"Lookin up keys in Lokalise returns {len(from_key_data)} results, expected {len(to_migrate)}"
f"Looking up keys in Lokalise returns {len(from_key_data)} results, expected {len(to_migrate)}"
)
return

Expand Down Expand Up @@ -72,7 +72,7 @@ def list_keys_helper(lokalise, keys, params={}, *, validate=True):
continue

print(
f"Lookin up keys in Lokalise returns {len(from_key_data)} results, expected {len(keys)}"
f"Looking up keys in Lokalise returns {len(from_key_data)} results, expected {len(keys)}"
)
searched = set(filter_keys)
returned = set(create_lookup(from_key_data))
Expand Down
2 changes: 1 addition & 1 deletion tests/components/dlna_dmr/test_media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ async def test_browse_media(
assert expected_child_audio in response["result"]["children"]

# Device specifies extra parameters in MIME type, uses non-standard "x-"
# prefix, and capitilizes things, all of which should be ignored
# prefix, and capitalizes things, all of which should be ignored
dmr_device_mock.sink_protocol_info = [
"http-get:*:audio/X-MPEG;codecs=mp3:*",
]
Expand Down
2 changes: 1 addition & 1 deletion tests/components/google_assistant/test_smart_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ async def test_identify(hass: HomeAssistant) -> None:
"payload": {
"device": {
"mdnsScanData": {
"additionals": [
"additionals": [ # codespell:ignore additionals
{
"type": "TXT",
"class": "IN",
Expand Down
2 changes: 1 addition & 1 deletion tests/components/idasen_desk/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def test_no_ble_device(hass: HomeAssistant, mock_desk_api: MagicMock) -> N
async def test_reconnect_on_bluetooth_callback(
hass: HomeAssistant, mock_desk_api: MagicMock
) -> None:
"""Test that a reconnet is made after the bluetooth callback is triggered."""
"""Test that a reconnect is made after the bluetooth callback is triggered."""
with mock.patch(
"homeassistant.components.idasen_desk.bluetooth.async_register_callback"
) as mock_register_callback:
Expand Down
4 changes: 2 additions & 2 deletions tests/components/mqtt/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ async def test_restore_all_active_subscriptions_on_reconnect(
async_fire_time_changed(hass) # cooldown
await hass.async_block_till_done()

# the subscribtion with the highest QoS should survive
# the subscription with the highest QoS should survive
expected = [
call([("test/state", 2)]),
]
Expand Down Expand Up @@ -1919,7 +1919,7 @@ async def test_subscribed_at_highest_qos(
freezer.tick(5)
async_fire_time_changed(hass) # cooldown
await hass.async_block_till_done()
# the subscribtion with the highest QoS should survive
# the subscription with the highest QoS should survive
assert help_all_subscribe_calls(mqtt_client_mock) == [("test/state", 2)]


Expand Down
2 changes: 1 addition & 1 deletion tests/components/mqtt/test_siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ async def test_unload_entry(
'{"state":"ON","tone":"siren"}',
'{"state":"OFF","tone":"siren"}',
),
# Attriute volume_level 2 is invalid, but the state is valid and should update
# Attribute volume_level 2 is invalid, but the state is valid and should update
(
"test-topic",
'{"state":"ON","volume_level":0.5}',
Expand Down
6 changes: 3 additions & 3 deletions tests/components/utility_meter/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ async def test_state_always_available(
],
)
async def test_not_unique_tariffs(hass: HomeAssistant, yaml_config) -> None:
"""Test utility sensor state initializtion."""
"""Test utility sensor state initialization."""
assert not await async_setup_component(hass, DOMAIN, yaml_config)


Expand Down Expand Up @@ -385,7 +385,7 @@ async def test_not_unique_tariffs(hass: HomeAssistant, yaml_config) -> None:
],
)
async def test_init(hass: HomeAssistant, yaml_config, config_entry_config) -> None:
"""Test utility sensor state initializtion."""
"""Test utility sensor state initialization."""
if yaml_config:
assert await async_setup_component(hass, DOMAIN, yaml_config)
await hass.async_block_till_done()
Expand Down Expand Up @@ -497,7 +497,7 @@ async def test_unique_id(
],
)
async def test_entity_name(hass: HomeAssistant, yaml_config, entity_id, name) -> None:
"""Test utility sensor state initializtion."""
"""Test utility sensor state initialization."""
assert await async_setup_component(hass, DOMAIN, yaml_config)
await hass.async_block_till_done()

Expand Down
2 changes: 1 addition & 1 deletion tests/util/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _loop_sleep_in_executor():
iexecutor.shutdown()
finish = time.monotonic()

# Idealy execution time (finish - start) should be < 1.2 sec.
# Ideally execution time (finish - start) should be < 1.2 sec.
# CI tests might not run in an ideal environment and timing might
# not be accurate, so we let this test pass
# if the duration is below 3 seconds.
Expand Down