mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Bump codespell from v1.16.0 to v1.17.1 and fix new spelling errors (#38663)
This commit is contained in:
parent
da89fa7884
commit
0427d87ba4
@ -13,11 +13,11 @@ 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.16.0
|
rev: v1.17.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
args:
|
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"
|
- --skip="./.*,*.csv,*.json"
|
||||||
- --quiet-level=2
|
- --quiet-level=2
|
||||||
exclude_types: [csv, json]
|
exclude_types: [csv, json]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"""Shared excecption for the august integration."""
|
"""Shared exceptions for the august integration."""
|
||||||
|
|
||||||
from homeassistant import exceptions
|
from homeassistant import exceptions
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ class AlexaConfig(alexa_config.AbstractConfig):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
_LOGGER.warning("Timeout trying to sync entitites to Alexa")
|
_LOGGER.warning("Timeout trying to sync entities to Alexa")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
except aiohttp.ClientError as err:
|
except aiohttp.ClientError as err:
|
||||||
|
@ -66,7 +66,7 @@ class HassIODiscovery(HomeAssistantView):
|
|||||||
try:
|
try:
|
||||||
data = await self.hassio.get_discovery_message(uuid)
|
data = await self.hassio.get_discovery_message(uuid)
|
||||||
except HassioAPIError as err:
|
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
|
raise HTTPServiceUnavailable() from None
|
||||||
|
|
||||||
await self.async_process_new(data)
|
await self.async_process_new(data)
|
||||||
|
@ -104,7 +104,7 @@ class SamsungTVDevice(MediaPlayerEntity):
|
|||||||
self._bridge.register_reauth_callback(self.access_denied)
|
self._bridge.register_reauth_callback(self.access_denied)
|
||||||
|
|
||||||
def access_denied(self):
|
def access_denied(self):
|
||||||
"""Access denied callbck."""
|
"""Access denied callback."""
|
||||||
LOGGER.debug("Access denied in getting remote object")
|
LOGGER.debug("Access denied in getting remote object")
|
||||||
self.hass.add_job(
|
self.hass.add_job(
|
||||||
self.hass.config_entries.flow.async_init(
|
self.hass.config_entries.flow.async_init(
|
||||||
|
@ -29,7 +29,7 @@ class VelbusConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
self._errors = {}
|
self._errors = {}
|
||||||
|
|
||||||
def _create_device(self, name: str, prt: str):
|
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})
|
return self.async_create_entry(title=name, data={CONF_PORT: prt})
|
||||||
|
|
||||||
def _test_connection(self, prt):
|
def _test_connection(self, prt):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
bandit==1.6.2
|
bandit==1.6.2
|
||||||
black==19.10b0
|
black==19.10b0
|
||||||
codespell==1.16.0
|
codespell==1.17.1
|
||||||
flake8-docstrings==1.5.0
|
flake8-docstrings==1.5.0
|
||||||
flake8==3.8.3
|
flake8==3.8.3
|
||||||
isort==4.3.21
|
isort==4.3.21
|
||||||
|
@ -764,7 +764,7 @@ async def test_automation_with_bad_trigger(hass, caplog):
|
|||||||
|
|
||||||
|
|
||||||
async def test_websocket_device_not_found(hass, hass_ws_client):
|
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", {})
|
await async_setup_component(hass, "device_automation", {})
|
||||||
client = await hass_ws_client(hass)
|
client = await hass_ws_client(hass)
|
||||||
await client.send_json(
|
await client.send_json(
|
||||||
|
@ -694,7 +694,7 @@ async def test_play_media_playlist(
|
|||||||
await setup_platform(hass, config_entry, config)
|
await setup_platform(hass, config_entry, config)
|
||||||
player = controller.players[1]
|
player = controller.players[1]
|
||||||
playlist = playlists[0]
|
playlist = playlists[0]
|
||||||
# Play without enqueing
|
# Play without enqueuing
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
MEDIA_PLAYER_DOMAIN,
|
MEDIA_PLAYER_DOMAIN,
|
||||||
SERVICE_PLAY_MEDIA,
|
SERVICE_PLAY_MEDIA,
|
||||||
@ -708,7 +708,7 @@ async def test_play_media_playlist(
|
|||||||
player.add_to_queue.assert_called_once_with(
|
player.add_to_queue.assert_called_once_with(
|
||||||
playlist, const.ADD_QUEUE_REPLACE_AND_PLAY
|
playlist, const.ADD_QUEUE_REPLACE_AND_PLAY
|
||||||
)
|
)
|
||||||
# Play with enqueing
|
# Play with enqueuing
|
||||||
player.add_to_queue.reset_mock()
|
player.add_to_queue.reset_mock()
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
MEDIA_PLAYER_DOMAIN,
|
MEDIA_PLAYER_DOMAIN,
|
||||||
|
@ -50,7 +50,7 @@ def test_recorder_bad_execute(hass_recorder):
|
|||||||
hass_recorder()
|
hass_recorder()
|
||||||
|
|
||||||
def to_native(validate_entity_id=True):
|
def to_native(validate_entity_id=True):
|
||||||
"""Rasie exception."""
|
"""Raise exception."""
|
||||||
raise SQLAlchemyError()
|
raise SQLAlchemyError()
|
||||||
|
|
||||||
mck1 = MagicMock()
|
mck1 = MagicMock()
|
||||||
|
@ -180,8 +180,8 @@ def log_msg(nr=2):
|
|||||||
_LOGGER.error("error message %s", nr)
|
_LOGGER.error("error message %s", nr)
|
||||||
|
|
||||||
|
|
||||||
async def test_dedup_logs(hass, simple_queue, hass_client):
|
async def test_dedupe_logs(hass, simple_queue, hass_client):
|
||||||
"""Test that duplicate log entries are dedup."""
|
"""Test that duplicate log entries are dedupe."""
|
||||||
await async_setup_component(hass, system_log.DOMAIN, {})
|
await async_setup_component(hass, system_log.DOMAIN, {})
|
||||||
_LOGGER.error("error message 1")
|
_LOGGER.error("error message 1")
|
||||||
log_msg()
|
log_msg()
|
||||||
|
@ -17,7 +17,7 @@ async def test_async_add_entities_retry(hass: HomeAssistantType):
|
|||||||
objects = ["Object 1", "Object 2", "Object 3", "Object 4"]
|
objects = ["Object 1", "Object 2", "Object 3", "Object 4"]
|
||||||
|
|
||||||
# For each call to async_add_entities_callback, the following side effects
|
# 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.
|
# 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
|
# To help understand what's going on, a comment exists describing what the
|
||||||
# object list looks like throughout the iterations.
|
# object list looks like throughout the iterations.
|
||||||
|
@ -944,14 +944,14 @@ class TestConfig(unittest.TestCase):
|
|||||||
|
|
||||||
self.config.allowlist_external_dirs = {"/home", "/var"}
|
self.config.allowlist_external_dirs = {"/home", "/var"}
|
||||||
|
|
||||||
unvalid = [
|
invalid = [
|
||||||
"/hass/config/secure",
|
"/hass/config/secure",
|
||||||
"/etc/passwd",
|
"/etc/passwd",
|
||||||
"/root/secure_file",
|
"/root/secure_file",
|
||||||
"/var/../etc/passwd",
|
"/var/../etc/passwd",
|
||||||
test_file,
|
test_file,
|
||||||
]
|
]
|
||||||
for path in unvalid:
|
for path in invalid:
|
||||||
assert not self.config.is_allowed_path(path)
|
assert not self.config.is_allowed_path(path)
|
||||||
|
|
||||||
with pytest.raises(AssertionError):
|
with pytest.raises(AssertionError):
|
||||||
|
@ -354,7 +354,7 @@ class TestSecrets(unittest.TestCase):
|
|||||||
assert expected == self._yaml["component"]
|
assert expected == self._yaml["component"]
|
||||||
|
|
||||||
def test_secrets_from_parent_folder(self):
|
def test_secrets_from_parent_folder(self):
|
||||||
"""Test loading secrets from parent foler."""
|
"""Test loading secrets from parent folder."""
|
||||||
expected = {"api_password": "pwhttp"}
|
expected = {"api_password": "pwhttp"}
|
||||||
self._yaml = load_yaml(
|
self._yaml = load_yaml(
|
||||||
os.path.join(self._sub_folder_path, "sub.yaml"),
|
os.path.join(self._sub_folder_path, "sub.yaml"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user