From 0427d87ba445bdd7646a4998ef6f3789aa1001e4 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sat, 8 Aug 2020 14:41:02 +0200 Subject: [PATCH] Bump codespell from v1.16.0 to v1.17.1 and fix new spelling errors (#38663) --- .pre-commit-config.yaml | 4 ++-- homeassistant/components/august/exceptions.py | 2 +- homeassistant/components/cloud/alexa_config.py | 2 +- homeassistant/components/hassio/discovery.py | 2 +- homeassistant/components/samsungtv/media_player.py | 2 +- homeassistant/components/velbus/config_flow.py | 2 +- requirements_test_pre_commit.txt | 2 +- tests/components/device_automation/test_init.py | 2 +- tests/components/heos/test_media_player.py | 4 ++-- tests/components/recorder/test_util.py | 2 +- tests/components/system_log/test_init.py | 4 ++-- tests/components/tplink/test_common.py | 2 +- tests/test_core.py | 4 ++-- tests/util/test_yaml.py | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 498774e748d..311c01ba1a3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,11 +13,11 @@ repos: - --quiet files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$ - repo: https://github.com/codespell-project/codespell - rev: v1.16.0 + rev: v1.17.1 hooks: - id: codespell args: - - --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing + - --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing,iam,incomfort - --skip="./.*,*.csv,*.json" - --quiet-level=2 exclude_types: [csv, json] diff --git a/homeassistant/components/august/exceptions.py b/homeassistant/components/august/exceptions.py index 78c467ab3a1..edd418c9519 100644 --- a/homeassistant/components/august/exceptions.py +++ b/homeassistant/components/august/exceptions.py @@ -1,4 +1,4 @@ -"""Shared excecption for the august integration.""" +"""Shared exceptions for the august integration.""" from homeassistant import exceptions diff --git a/homeassistant/components/cloud/alexa_config.py b/homeassistant/components/cloud/alexa_config.py index a45469c8f97..3afb0ce2e86 100644 --- a/homeassistant/components/cloud/alexa_config.py +++ b/homeassistant/components/cloud/alexa_config.py @@ -259,7 +259,7 @@ class AlexaConfig(alexa_config.AbstractConfig): return True except asyncio.TimeoutError: - _LOGGER.warning("Timeout trying to sync entitites to Alexa") + _LOGGER.warning("Timeout trying to sync entities to Alexa") return False except aiohttp.ClientError as err: diff --git a/homeassistant/components/hassio/discovery.py b/homeassistant/components/hassio/discovery.py index fc6efbe0e58..f3337254f1a 100644 --- a/homeassistant/components/hassio/discovery.py +++ b/homeassistant/components/hassio/discovery.py @@ -66,7 +66,7 @@ class HassIODiscovery(HomeAssistantView): try: data = await self.hassio.get_discovery_message(uuid) except HassioAPIError as err: - _LOGGER.error("Can't read discovey data: %s", err) + _LOGGER.error("Can't read discovery data: %s", err) raise HTTPServiceUnavailable() from None await self.async_process_new(data) diff --git a/homeassistant/components/samsungtv/media_player.py b/homeassistant/components/samsungtv/media_player.py index 7eb0f50efc2..774027776c4 100644 --- a/homeassistant/components/samsungtv/media_player.py +++ b/homeassistant/components/samsungtv/media_player.py @@ -104,7 +104,7 @@ class SamsungTVDevice(MediaPlayerEntity): self._bridge.register_reauth_callback(self.access_denied) def access_denied(self): - """Access denied callbck.""" + """Access denied callback.""" LOGGER.debug("Access denied in getting remote object") self.hass.add_job( self.hass.config_entries.flow.async_init( diff --git a/homeassistant/components/velbus/config_flow.py b/homeassistant/components/velbus/config_flow.py index e85422d740a..361b5a01175 100644 --- a/homeassistant/components/velbus/config_flow.py +++ b/homeassistant/components/velbus/config_flow.py @@ -29,7 +29,7 @@ class VelbusConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): self._errors = {} def _create_device(self, name: str, prt: str): - """Create an antry async.""" + """Create an entry async.""" return self.async_create_entry(title=name, data={CONF_PORT: prt}) def _test_connection(self, prt): diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index 55748aaca44..62c8fa113de 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -2,7 +2,7 @@ bandit==1.6.2 black==19.10b0 -codespell==1.16.0 +codespell==1.17.1 flake8-docstrings==1.5.0 flake8==3.8.3 isort==4.3.21 diff --git a/tests/components/device_automation/test_init.py b/tests/components/device_automation/test_init.py index d6a9fda00bc..19786bb08e8 100644 --- a/tests/components/device_automation/test_init.py +++ b/tests/components/device_automation/test_init.py @@ -764,7 +764,7 @@ async def test_automation_with_bad_trigger(hass, caplog): async def test_websocket_device_not_found(hass, hass_ws_client): - """Test caling command with unknown device.""" + """Test calling command with unknown device.""" await async_setup_component(hass, "device_automation", {}) client = await hass_ws_client(hass) await client.send_json( diff --git a/tests/components/heos/test_media_player.py b/tests/components/heos/test_media_player.py index 835f34e5efc..b2d96707d7e 100644 --- a/tests/components/heos/test_media_player.py +++ b/tests/components/heos/test_media_player.py @@ -694,7 +694,7 @@ async def test_play_media_playlist( await setup_platform(hass, config_entry, config) player = controller.players[1] playlist = playlists[0] - # Play without enqueing + # Play without enqueuing await hass.services.async_call( MEDIA_PLAYER_DOMAIN, SERVICE_PLAY_MEDIA, @@ -708,7 +708,7 @@ async def test_play_media_playlist( player.add_to_queue.assert_called_once_with( playlist, const.ADD_QUEUE_REPLACE_AND_PLAY ) - # Play with enqueing + # Play with enqueuing player.add_to_queue.reset_mock() await hass.services.async_call( MEDIA_PLAYER_DOMAIN, diff --git a/tests/components/recorder/test_util.py b/tests/components/recorder/test_util.py index 56f1e069a61..71bfc1e3bd4 100644 --- a/tests/components/recorder/test_util.py +++ b/tests/components/recorder/test_util.py @@ -50,7 +50,7 @@ def test_recorder_bad_execute(hass_recorder): hass_recorder() def to_native(validate_entity_id=True): - """Rasie exception.""" + """Raise exception.""" raise SQLAlchemyError() mck1 = MagicMock() diff --git a/tests/components/system_log/test_init.py b/tests/components/system_log/test_init.py index d19ca2261bb..d3f7447277c 100644 --- a/tests/components/system_log/test_init.py +++ b/tests/components/system_log/test_init.py @@ -180,8 +180,8 @@ def log_msg(nr=2): _LOGGER.error("error message %s", nr) -async def test_dedup_logs(hass, simple_queue, hass_client): - """Test that duplicate log entries are dedup.""" +async def test_dedupe_logs(hass, simple_queue, hass_client): + """Test that duplicate log entries are dedupe.""" await async_setup_component(hass, system_log.DOMAIN, {}) _LOGGER.error("error message 1") log_msg() diff --git a/tests/components/tplink/test_common.py b/tests/components/tplink/test_common.py index a2bd7ef87ff..9c219f1ba83 100644 --- a/tests/components/tplink/test_common.py +++ b/tests/components/tplink/test_common.py @@ -17,7 +17,7 @@ async def test_async_add_entities_retry(hass: HomeAssistantType): objects = ["Object 1", "Object 2", "Object 3", "Object 4"] # For each call to async_add_entities_callback, the following side effects - # will be triggered in order. This set of side effects accuratley simulates + # will be triggered in order. This set of side effects accurateley simulates # 3 attempts to add all entities while also handling several return types. # To help understand what's going on, a comment exists describing what the # object list looks like throughout the iterations. diff --git a/tests/test_core.py b/tests/test_core.py index 77baa502687..05a969d0a75 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -944,14 +944,14 @@ class TestConfig(unittest.TestCase): self.config.allowlist_external_dirs = {"/home", "/var"} - unvalid = [ + invalid = [ "/hass/config/secure", "/etc/passwd", "/root/secure_file", "/var/../etc/passwd", test_file, ] - for path in unvalid: + for path in invalid: assert not self.config.is_allowed_path(path) with pytest.raises(AssertionError): diff --git a/tests/util/test_yaml.py b/tests/util/test_yaml.py index 4d6f4ce3ac9..96b6a86a27d 100644 --- a/tests/util/test_yaml.py +++ b/tests/util/test_yaml.py @@ -354,7 +354,7 @@ class TestSecrets(unittest.TestCase): assert expected == self._yaml["component"] def test_secrets_from_parent_folder(self): - """Test loading secrets from parent foler.""" + """Test loading secrets from parent folder.""" expected = {"api_password": "pwhttp"} self._yaml = load_yaml( os.path.join(self._sub_folder_path, "sub.yaml"),