Enable raise-within-try (TRY301) rule in ruff (#123351)

This commit is contained in:
epenet
2024-08-12 09:16:33 +02:00
committed by GitHub
parent b15ea58851
commit 0bb8c4832d
32 changed files with 41 additions and 42 deletions

View File

@@ -277,7 +277,7 @@ def execute(hass, filename, source, data=None, return_response=False):
if not isinstance(restricted_globals["output"], dict):
output_type = type(restricted_globals["output"])
restricted_globals["output"] = {}
raise ScriptError(
raise ScriptError( # noqa: TRY301
f"Expected `output` to be a dictionary, was {output_type}"
)
except ScriptError as err: