1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Enable Ruff TRY300 (#114437)

* Enable Ruff TRY300

* Update validation.py

* Address review comments
This commit is contained in:
Sid
2024-03-30 10:37:59 +01:00
committed by GitHub
parent 9a79320861
commit 6587ee20db
97 changed files with 259 additions and 243 deletions

View File

@@ -109,7 +109,6 @@ async def async_handle(
try:
_LOGGER.info("Triggering intent handler %s", handler)
result = await handler.async_handle(intent)
return result
except vol.Invalid as err:
_LOGGER.warning("Received invalid slot info for %s: %s", intent_type, err)
raise InvalidSlotInfo(f"Received invalid slot info for {intent_type}") from err
@@ -117,6 +116,7 @@ async def async_handle(
raise # bubble up intent related errors
except Exception as err:
raise IntentUnexpectedError(f"Error handling {intent_type}") from err
return result
class IntentError(HomeAssistantError):