1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-18 07:56:03 +01:00

Cleanup unnecessary brackets for except statements (core) (#162410)

This commit is contained in:
epenet
2026-02-06 13:45:59 +01:00
committed by GitHub
parent 3b40bb7d28
commit 1c59d846e3
19 changed files with 73 additions and 73 deletions

View File

@@ -385,7 +385,7 @@ def _get_by_path(data: dict | list, items: list[Hashable]) -> Any:
"""
try:
return reduce(operator.getitem, items, data) # type: ignore[arg-type]
except (KeyError, IndexError, TypeError):
except KeyError, IndexError, TypeError:
return None
@@ -604,7 +604,7 @@ def _identify_config_schema(module: ComponentProtocol) -> str | None:
try:
key = next(k for k in schema if k == module.DOMAIN)
except (TypeError, AttributeError, StopIteration):
except TypeError, AttributeError, StopIteration:
return None
except Exception:
_LOGGER.exception("Unexpected error identifying config schema")