mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Update codespell ignore list (#118018)
This commit is contained in:
parent
3b4b36a9fd
commit
905adb2431
@ -12,7 +12,7 @@ repos:
|
||||
hooks:
|
||||
- id: codespell
|
||||
args:
|
||||
- --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
|
||||
- --ignore-words-list=astroid,checkin,currenty,hass,iif,incomfort,lookin,nam,NotIn,pres,ser,ue
|
||||
- --skip="./.*,*.csv,*.json,*.ambr"
|
||||
- --quiet-level=2
|
||||
exclude_types: [csv, json, html]
|
||||
|
@ -66,7 +66,7 @@ SUPPORTED_VOICES: Final[list[str]] = [
|
||||
"Hans", # German
|
||||
"Hiujin", # Chinese (Cantonese), Neural
|
||||
"Ida", # Norwegian, Neural
|
||||
"Ines", # Portuguese, European
|
||||
"Ines", # Portuguese, European # codespell:ignore ines
|
||||
"Ivy", # English
|
||||
"Jacek", # Polish
|
||||
"Jan", # Polish
|
||||
|
@ -268,7 +268,7 @@ WALLETS = {
|
||||
"XTZ": "XTZ",
|
||||
"YER": "YER",
|
||||
"YFI": "YFI",
|
||||
"ZAR": "ZAR",
|
||||
"ZAR": "ZAR", # codespell:ignore zar
|
||||
"ZEC": "ZEC",
|
||||
"ZMW": "ZMW",
|
||||
"ZRX": "ZRX",
|
||||
@ -590,7 +590,7 @@ RATES = {
|
||||
"YER": "YER",
|
||||
"YFI": "YFI",
|
||||
"YFII": "YFII",
|
||||
"ZAR": "ZAR",
|
||||
"ZAR": "ZAR", # codespell:ignore zar
|
||||
"ZEC": "ZEC",
|
||||
"ZEN": "ZEN",
|
||||
"ZMW": "ZMW",
|
||||
|
@ -3,9 +3,9 @@
|
||||
Data is fetched from DWD:
|
||||
https://rcccm.dwd.de/DE/wetter/warnungen_aktuell/objekt_einbindung/objekteinbindung.html
|
||||
|
||||
Warnungen vor extremem Unwetter (Stufe 4)
|
||||
Warnungen vor extremem Unwetter (Stufe 4) # codespell:ignore vor
|
||||
Unwetterwarnungen (Stufe 3)
|
||||
Warnungen vor markantem Wetter (Stufe 2)
|
||||
Warnungen vor markantem Wetter (Stufe 2) # codespell:ignore vor
|
||||
Wetterwarnungen (Stufe 1)
|
||||
"""
|
||||
|
||||
|
@ -26,7 +26,7 @@ async def async_get_device_diagnostics(
|
||||
"device": {
|
||||
"name": station.station,
|
||||
"model": station.model,
|
||||
"frequency": station.frequence,
|
||||
"frequency": station.frequence, # codespell:ignore frequence
|
||||
"version": station.version,
|
||||
},
|
||||
"raw": ecowitt.last_values[station_id],
|
||||
|
@ -44,7 +44,7 @@ class FibaroLock(FibaroDevice, LockEntity):
|
||||
|
||||
def unlock(self, **kwargs: Any) -> None:
|
||||
"""Unlock the device."""
|
||||
self.action("unsecure")
|
||||
self.action("unsecure") # codespell:ignore unsecure
|
||||
self._attr_is_locked = False
|
||||
|
||||
def update(self) -> None:
|
||||
|
@ -72,5 +72,5 @@ class FreeboxSwitch(SwitchEntity):
|
||||
|
||||
async def async_update(self) -> None:
|
||||
"""Get the state and update it."""
|
||||
datas = await self._router.wifi.get_global_config()
|
||||
self._attr_is_on = bool(datas["enabled"])
|
||||
data = await self._router.wifi.get_global_config()
|
||||
self._attr_is_on = bool(data["enabled"])
|
||||
|
@ -15,7 +15,10 @@ from .helpers import async_send_text_commands, default_language_code
|
||||
# https://support.google.com/assistant/answer/9071582?hl=en
|
||||
LANG_TO_BROADCAST_COMMAND = {
|
||||
"en": ("broadcast {0}", "broadcast to {1} {0}"),
|
||||
"de": ("Nachricht an alle {0}", "Nachricht an alle an {1} {0}"),
|
||||
"de": (
|
||||
"Nachricht an alle {0}", # codespell:ignore alle
|
||||
"Nachricht an alle an {1} {0}", # codespell:ignore alle
|
||||
),
|
||||
"es": ("Anuncia {0}", "Anuncia en {1} {0}"),
|
||||
"fr": ("Diffuse {0}", "Diffuse dans {1} {0}"),
|
||||
"it": ("Trasmetti {0}", "Trasmetti in {1} {0}"),
|
||||
|
@ -81,7 +81,7 @@ SUPPORT_LANGUAGES = [
|
||||
"sv",
|
||||
"sw",
|
||||
"ta",
|
||||
"te",
|
||||
"te", # codespell:ignore te
|
||||
"th",
|
||||
"tl",
|
||||
"tr",
|
||||
|
@ -67,7 +67,7 @@ ALL_LANGUAGES = [
|
||||
"sr",
|
||||
"sv",
|
||||
"ta",
|
||||
"te",
|
||||
"te", # codespell:ignore te
|
||||
"th",
|
||||
"tl",
|
||||
"tr",
|
||||
|
@ -44,14 +44,14 @@ BUTTON_ENTITIES: dict[str, HomeKitButtonEntityDescription] = {
|
||||
name="Setup",
|
||||
translation_key="setup",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
write_value="#HAA@trcmd",
|
||||
write_value="#HAA@trcmd", # codespell:ignore haa
|
||||
),
|
||||
CharacteristicsTypes.VENDOR_HAA_UPDATE: HomeKitButtonEntityDescription(
|
||||
key=CharacteristicsTypes.VENDOR_HAA_UPDATE,
|
||||
name="Update",
|
||||
device_class=ButtonDeviceClass.UPDATE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
write_value="#HAA@trcmd",
|
||||
write_value="#HAA@trcmd", # codespell:ignore haa
|
||||
),
|
||||
CharacteristicsTypes.IDENTIFY: HomeKitButtonEntityDescription(
|
||||
key=CharacteristicsTypes.IDENTIFY,
|
||||
|
@ -303,7 +303,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
||||
key="rsrp",
|
||||
translation_key="rsrp",
|
||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||
# http://www.lte-anbieter.info/technik/rsrp.php
|
||||
# http://www.lte-anbieter.info/technik/rsrp.php # codespell:ignore technik
|
||||
icon_fn=lambda x: signal_icon((-110, -95, -80), x),
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
@ -313,7 +313,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
||||
key="rsrq",
|
||||
translation_key="rsrq",
|
||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||
# http://www.lte-anbieter.info/technik/rsrq.php
|
||||
# http://www.lte-anbieter.info/technik/rsrq.php # codespell:ignore technik
|
||||
icon_fn=lambda x: signal_icon((-11, -8, -5), x),
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
@ -333,7 +333,7 @@ SENSOR_META: dict[str, HuaweiSensorGroup] = {
|
||||
key="sinr",
|
||||
translation_key="sinr",
|
||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||
# http://www.lte-anbieter.info/technik/sinr.php
|
||||
# http://www.lte-anbieter.info/technik/sinr.php # codespell:ignore technik
|
||||
icon_fn=lambda x: signal_icon((0, 5, 10), x),
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
|
@ -34,7 +34,7 @@ from .models import IsyData
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ISYSwitchEntityDescription(SwitchEntityDescription):
|
||||
"""Describes IST switch."""
|
||||
"""Describes ISY switch."""
|
||||
|
||||
# ISYEnableSwitchEntity does not support UNDEFINED or None,
|
||||
# restrict the type to str.
|
||||
|
@ -396,7 +396,7 @@ class JellyfinSource(MediaSource):
|
||||
k.get(ITEM_KEY_NAME),
|
||||
),
|
||||
)
|
||||
return [await self._build_series(serie, False) for serie in series]
|
||||
return [await self._build_series(s, False) for s in series]
|
||||
|
||||
async def _build_series(
|
||||
self, series: dict[str, Any], include_children: bool
|
||||
|
@ -56,7 +56,7 @@ INFO_SENSORS = (
|
||||
TIME_SENSORS = (
|
||||
SensorEntityDescription(
|
||||
key="first_light",
|
||||
name="Alot Hashachar",
|
||||
name="Alot Hashachar", # codespell:ignore alot
|
||||
icon="mdi:weather-sunset-up",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -31,7 +31,7 @@ WMO_TO_HA_CONDITION_MAP = {
|
||||
2: ATTR_CONDITION_PARTLYCLOUDY, # Partly cloudy
|
||||
3: ATTR_CONDITION_CLOUDY, # Overcast
|
||||
45: ATTR_CONDITION_FOG, # Fog
|
||||
48: ATTR_CONDITION_FOG, # Depositing rime fog
|
||||
48: ATTR_CONDITION_FOG, # Depositing rime fog # codespell:ignore rime
|
||||
51: ATTR_CONDITION_RAINY, # Drizzle: Light intensity
|
||||
53: ATTR_CONDITION_RAINY, # Drizzle: Moderate intensity
|
||||
55: ATTR_CONDITION_RAINY, # Drizzle: Dense intensity
|
||||
|
@ -83,7 +83,7 @@ async def async_connect_or_timeout(
|
||||
_LOGGER.debug("Initialize connection to vacuum")
|
||||
await hass.async_add_executor_job(roomba.connect)
|
||||
while not roomba.roomba_connected or name is None:
|
||||
# Waiting for connection and check datas ready
|
||||
# Waiting for connection and check data is ready
|
||||
name = roomba_reported_state(roomba).get("name", None)
|
||||
if name:
|
||||
break
|
||||
|
@ -232,7 +232,9 @@ def setup_platform(
|
||||
|
||||
# Changing inverter temperature unit.
|
||||
inverter_temp_description = SENSOR_TYPE_INVERTER_TEMPERATURE
|
||||
if status.inverters.primary.temperature.units.farenheit:
|
||||
if (
|
||||
status.inverters.primary.temperature.units.farenheit # codespell:ignore farenheit
|
||||
):
|
||||
inverter_temp_description = dataclasses.replace(
|
||||
inverter_temp_description,
|
||||
native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,
|
||||
|
@ -80,7 +80,7 @@ SUPPORT_LANGUAGES = [
|
||||
"vi-vn",
|
||||
]
|
||||
|
||||
SUPPORT_CODECS = ["mp3", "wav", "aac", "ogg", "caf"]
|
||||
SUPPORT_CODECS = ["mp3", "wav", "aac", "ogg", "caf"] # codespell:ignore caf
|
||||
|
||||
SUPPORT_FORMATS = [
|
||||
"8khz_8bit_mono",
|
||||
|
@ -2402,8 +2402,9 @@ def base64_decode(value):
|
||||
|
||||
def ordinal(value):
|
||||
"""Perform ordinal conversion."""
|
||||
suffixes = ["th", "st", "nd", "rd"] + ["th"] * 6 # codespell:ignore nd
|
||||
return str(value) + (
|
||||
list(["th", "st", "nd", "rd"] + ["th"] * 6)[(int(str(value)[-1])) % 10]
|
||||
suffixes[(int(str(value)[-1])) % 10]
|
||||
if int(str(value)[-2:]) % 100 not in range(11, 14)
|
||||
else "th"
|
||||
)
|
||||
|
@ -42,9 +42,12 @@ def mock_api_call(cmd: str, fetch_data: bool = False) -> dict[str, Any]:
|
||||
return TOWN_DATA_MOCK
|
||||
if cmd == "maestro/municipios":
|
||||
return TOWNS_DATA_MOCK
|
||||
if cmd == "observacion/convencional/datos/estacion/3195":
|
||||
if (
|
||||
cmd
|
||||
== "observacion/convencional/datos/estacion/3195" # codespell:ignore convencional
|
||||
):
|
||||
return STATION_DATA_MOCK
|
||||
if cmd == "observacion/convencional/todas":
|
||||
if cmd == "observacion/convencional/todas": # codespell:ignore convencional
|
||||
return STATIONS_DATA_MOCK
|
||||
if cmd == "prediccion/especifica/municipio/diaria/28065":
|
||||
return FORECAST_DAILY_DATA_MOCK
|
||||
|
@ -45,7 +45,7 @@ MANY_LANGUAGES = [
|
||||
"sr",
|
||||
"sv",
|
||||
"sw",
|
||||
"te",
|
||||
"te", # codespell:ignore te
|
||||
"tr",
|
||||
"uk",
|
||||
"ur",
|
||||
|
@ -281,8 +281,8 @@ async def test_strict_connection_cloud_external_unauthenticated_requests(
|
||||
|
||||
async def _modify_cookie_for_cloud(client: TestClient, token_type: str) -> str:
|
||||
"""Modify cookie for cloud."""
|
||||
# Cloud cookie has set secure=true and will not set on unsecure connection
|
||||
# As we test with unsecure connection, we need to set it manually
|
||||
# Cloud cookie has set secure=true and will not set on insecure connection
|
||||
# As we test with insecure connection, we need to set it manually
|
||||
# We get the session via http and modify the cookie name to the secure one
|
||||
session_id = await (await client.get(f"/test/cookie?token={token_type}")).text()
|
||||
cookie_jar = client.session.cookie_jar
|
||||
|
@ -61,7 +61,7 @@ async def test_press_button(hass: HomeAssistant) -> None:
|
||||
button.async_assert_service_values(
|
||||
ServicesTypes.OUTLET,
|
||||
{
|
||||
CharacteristicsTypes.VENDOR_HAA_SETUP: "#HAA@trcmd",
|
||||
CharacteristicsTypes.VENDOR_HAA_SETUP: "#HAA@trcmd", # codespell:ignore haa
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -144,7 +144,7 @@ async def test_user_flow_invalid_auth(hass: HomeAssistant) -> None:
|
||||
"homeassistant.components.hvv_departures.hub.GTI.init",
|
||||
side_effect=InvalidAuth(
|
||||
"ERROR_TEXT",
|
||||
"Bei der Verarbeitung der Anfrage ist ein technisches Problem aufgetreten.",
|
||||
"Bei der Verarbeitung der Anfrage ist ein technisches Problem aufgetreten.", # codespell:ignore ist
|
||||
"Authentication failed!",
|
||||
),
|
||||
):
|
||||
@ -343,7 +343,7 @@ async def test_options_flow_invalid_auth(hass: HomeAssistant) -> None:
|
||||
"homeassistant.components.hvv_departures.hub.GTI.departureList",
|
||||
side_effect=InvalidAuth(
|
||||
"ERROR_TEXT",
|
||||
"Bei der Verarbeitung der Anfrage ist ein technisches Problem aufgetreten.",
|
||||
"Bei der Verarbeitung der Anfrage ist ein technisches Problem aufgetreten.", # codespell:ignore ist
|
||||
"Authentication failed!",
|
||||
),
|
||||
):
|
||||
|
@ -24,20 +24,24 @@ def mocked_request_function(url: str) -> dict[str, Any]:
|
||||
load_fixture("sample_labels.json", "nina")
|
||||
)
|
||||
|
||||
if "https://warnung.bund.de/api31/dashboard/" in url:
|
||||
if "https://warnung.bund.de/api31/dashboard/" in url: # codespell:ignore bund
|
||||
return dummy_response
|
||||
|
||||
if "https://warnung.bund.de/api/appdata/gsb/labels/de_labels.json" in url:
|
||||
if (
|
||||
"https://warnung.bund.de/api/appdata/gsb/labels/de_labels.json" # codespell:ignore bund
|
||||
in url
|
||||
):
|
||||
return dummy_response_labels
|
||||
|
||||
if (
|
||||
url
|
||||
== "https://www.xrepository.de/api/xrepository/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:rs_2021-07-31/download/Regionalschl_ssel_2021-07-31.json"
|
||||
== "https://www.xrepository.de/api/xrepository/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:rs_2021-07-31/download/Regionalschl_ssel_2021-07-31.json" # codespell:ignore bund
|
||||
):
|
||||
return dummy_response_regions
|
||||
|
||||
warning_id = url.replace("https://warnung.bund.de/api31/warnings/", "").replace(
|
||||
".json", ""
|
||||
)
|
||||
warning_id = url.replace(
|
||||
"https://warnung.bund.de/api31/warnings/", # codespell:ignore bund
|
||||
"",
|
||||
).replace(".json", "")
|
||||
|
||||
return dummy_response_details[warning_id]
|
||||
|
@ -246,7 +246,7 @@ async def test_entry_diagnostics(
|
||||
"battery": [],
|
||||
"dbm": 0,
|
||||
"vmUse": 161592,
|
||||
"resSet": 10540,
|
||||
"resSet": 10540, # codespell:ignore resset
|
||||
"uptime": 810043.74,
|
||||
"wifiDisconnects": 1,
|
||||
"wifiDriverReloads": 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user