Switch formatting from black to ruff-format (#102893)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Aarni Koskela 2023-11-27 15:38:59 +02:00 committed by GitHub
parent cf9b0e804f
commit 706add4a57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
161 changed files with 530 additions and 607 deletions

View file

@ -403,9 +403,7 @@ async def async_get_zeroconf(
hass: HomeAssistant,
) -> dict[str, list[dict[str, str | dict[str, str]]]]:
"""Return cached list of zeroconf types."""
zeroconf: dict[
str, list[dict[str, str | dict[str, str]]]
] = ZEROCONF.copy() # type: ignore[assignment]
zeroconf: dict[str, list[dict[str, str | dict[str, str]]]] = ZEROCONF.copy() # type: ignore[assignment]
integrations = await async_get_custom_components(hass)
for integration in integrations.values():
@ -1013,9 +1011,7 @@ def _load_file(
Async friendly.
"""
with suppress(KeyError):
return hass.data[DATA_COMPONENTS][ # type: ignore[no-any-return]
comp_or_platform
]
return hass.data[DATA_COMPONENTS][comp_or_platform] # type: ignore[no-any-return]
cache = hass.data[DATA_COMPONENTS]