From 1c8fbc7e6a3efe62f5ac3d609e62e1fb50265162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 31 Dec 2020 20:14:07 +0200 Subject: [PATCH] Upgrade codespell to 2.0.0 (#44695) * Upgrade codespell to 2.0.0 * Fix newly found spelling errors --- .pre-commit-config.yaml | 2 +- homeassistant/components/rflink/__init__.py | 2 +- homeassistant/helpers/service.py | 6 ++++-- requirements_test_pre_commit.txt | 2 +- tests/components/homematicip_cloud/conftest.py | 2 +- tests/components/homematicip_cloud/test_climate.py | 2 +- tests/test_loader.py | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c96a990433a..11cd4aa7731 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - --quiet files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$ - repo: https://github.com/codespell-project/codespell - rev: v1.17.1 + rev: v2.0.0 hooks: - id: codespell args: diff --git a/homeassistant/components/rflink/__init__.py b/homeassistant/components/rflink/__init__.py index 68b6d841654..116b2464213 100644 --- a/homeassistant/components/rflink/__init__.py +++ b/homeassistant/components/rflink/__init__.py @@ -520,7 +520,7 @@ class RflinkCommand(RflinkDevice): if self._wait_ack: # 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) else: # Puts command on outgoing buffer and returns straight away. diff --git a/homeassistant/helpers/service.py b/homeassistant/helpers/service.py index 25a88bb59cb..c95f942c6dc 100644 --- a/homeassistant/helpers/service.py +++ b/homeassistant/helpers/service.py @@ -128,13 +128,15 @@ async def async_call_from_config( ) -> None: """Call a service based on a config hash.""" 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: if blocking: raise _LOGGER.error(ex) else: - await hass.services.async_call(*parms, blocking, context) + await hass.services.async_call(*params, blocking, context) @ha.callback diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index e479f5e9ac1..953c7d75394 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -2,7 +2,7 @@ bandit==1.7.0 black==20.8b1 -codespell==1.17.1 +codespell==2.0.0 flake8-docstrings==1.5.0 flake8==3.8.4 isort==5.5.3 diff --git a/tests/components/homematicip_cloud/conftest.py b/tests/components/homematicip_cloud/conftest.py index 9764ee74e22..8bf792c259f 100644 --- a/tests/components/homematicip_cloud/conftest.py +++ b/tests/components/homematicip_cloud/conftest.py @@ -46,7 +46,7 @@ def mock_connection_fixture() -> AsyncConnection: @pytest.fixture(name="hmip_config_entry") 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 = { HMIPC_HAPID: HAPID, HMIPC_AUTHTOKEN: AUTH_TOKEN, diff --git a/tests/components/homematicip_cloud/test_climate.py b/tests/components/homematicip_cloud/test_climate.py index 6d5c3fb6060..dc850fac026 100644 --- a/tests/components/homematicip_cloud/test_climate.py +++ b/tests/components/homematicip_cloud/test_climate.py @@ -129,7 +129,7 @@ async def test_hmip_heating_group_heat(hass, default_mock_hap_factory): ha_state = hass.states.get(entity_id) 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( "climate", "set_temperature", diff --git a/tests/test_loader.py b/tests/test_loader.py index c05240893de..64c8c5764cf 100644 --- a/tests/test_loader.py +++ b/tests/test_loader.py @@ -97,7 +97,7 @@ async def test_helpers_wrapper(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") int_comp = integration.get_component() assert int_comp.__name__ == "custom_components.test_standalone"