mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Upgrade codespell to 2.0.0 (#44695)
* Upgrade codespell to 2.0.0 * Fix newly found spelling errors
This commit is contained in:
parent
cdda5900e5
commit
1c8fbc7e6a
@ -13,7 +13,7 @@ repos:
|
|||||||
- --quiet
|
- --quiet
|
||||||
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
|
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: v1.17.1
|
rev: v2.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
args:
|
args:
|
||||||
|
@ -520,7 +520,7 @@ class RflinkCommand(RflinkDevice):
|
|||||||
|
|
||||||
if self._wait_ack:
|
if self._wait_ack:
|
||||||
# Puts command on outgoing buffer then waits for Rflink to confirm
|
# Puts command on outgoing buffer then waits for Rflink to confirm
|
||||||
# the command has been send out in the ether.
|
# the command has been sent out.
|
||||||
await self._protocol.send_command_ack(self._device_id, cmd)
|
await self._protocol.send_command_ack(self._device_id, cmd)
|
||||||
else:
|
else:
|
||||||
# Puts command on outgoing buffer and returns straight away.
|
# Puts command on outgoing buffer and returns straight away.
|
||||||
|
@ -128,13 +128,15 @@ async def async_call_from_config(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Call a service based on a config hash."""
|
"""Call a service based on a config hash."""
|
||||||
try:
|
try:
|
||||||
parms = async_prepare_call_from_config(hass, config, variables, validate_config)
|
params = async_prepare_call_from_config(
|
||||||
|
hass, config, variables, validate_config
|
||||||
|
)
|
||||||
except HomeAssistantError as ex:
|
except HomeAssistantError as ex:
|
||||||
if blocking:
|
if blocking:
|
||||||
raise
|
raise
|
||||||
_LOGGER.error(ex)
|
_LOGGER.error(ex)
|
||||||
else:
|
else:
|
||||||
await hass.services.async_call(*parms, blocking, context)
|
await hass.services.async_call(*params, blocking, context)
|
||||||
|
|
||||||
|
|
||||||
@ha.callback
|
@ha.callback
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
bandit==1.7.0
|
bandit==1.7.0
|
||||||
black==20.8b1
|
black==20.8b1
|
||||||
codespell==1.17.1
|
codespell==2.0.0
|
||||||
flake8-docstrings==1.5.0
|
flake8-docstrings==1.5.0
|
||||||
flake8==3.8.4
|
flake8==3.8.4
|
||||||
isort==5.5.3
|
isort==5.5.3
|
||||||
|
@ -46,7 +46,7 @@ def mock_connection_fixture() -> AsyncConnection:
|
|||||||
|
|
||||||
@pytest.fixture(name="hmip_config_entry")
|
@pytest.fixture(name="hmip_config_entry")
|
||||||
def hmip_config_entry_fixture() -> config_entries.ConfigEntry:
|
def hmip_config_entry_fixture() -> config_entries.ConfigEntry:
|
||||||
"""Create a mock config entriy for homematic ip cloud."""
|
"""Create a mock config entry for homematic ip cloud."""
|
||||||
entry_data = {
|
entry_data = {
|
||||||
HMIPC_HAPID: HAPID,
|
HMIPC_HAPID: HAPID,
|
||||||
HMIPC_AUTHTOKEN: AUTH_TOKEN,
|
HMIPC_AUTHTOKEN: AUTH_TOKEN,
|
||||||
|
@ -129,7 +129,7 @@ async def test_hmip_heating_group_heat(hass, default_mock_hap_factory):
|
|||||||
ha_state = hass.states.get(entity_id)
|
ha_state = hass.states.get(entity_id)
|
||||||
assert ha_state.attributes[ATTR_PRESET_MODE] == "STD"
|
assert ha_state.attributes[ATTR_PRESET_MODE] == "STD"
|
||||||
|
|
||||||
# Not required for hmip, but a posiblity to send no temperature.
|
# Not required for hmip, but a possibility to send no temperature.
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
"climate",
|
"climate",
|
||||||
"set_temperature",
|
"set_temperature",
|
||||||
|
@ -97,7 +97,7 @@ async def test_helpers_wrapper(hass):
|
|||||||
|
|
||||||
|
|
||||||
async def test_custom_component_name(hass):
|
async def test_custom_component_name(hass):
|
||||||
"""Test the name attribte of custom components."""
|
"""Test the name attribute of custom components."""
|
||||||
integration = await loader.async_get_integration(hass, "test_standalone")
|
integration = await loader.async_get_integration(hass, "test_standalone")
|
||||||
int_comp = integration.get_component()
|
int_comp = integration.get_component()
|
||||||
assert int_comp.__name__ == "custom_components.test_standalone"
|
assert int_comp.__name__ == "custom_components.test_standalone"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user