Enable raise-within-try (TRY301) rule in ruff (#123351)
This commit is contained in:
parent
b15ea58851
commit
0bb8c4832d
32 changed files with 41 additions and 42 deletions
|
@ -406,7 +406,7 @@ class SensorGroup(GroupEntity, SensorEntity):
|
|||
and (uom := state.attributes["unit_of_measurement"])
|
||||
not in self._valid_units
|
||||
):
|
||||
raise HomeAssistantError("Not a valid unit")
|
||||
raise HomeAssistantError("Not a valid unit") # noqa: TRY301
|
||||
|
||||
sensor_values.append((entity_id, numeric_state, state))
|
||||
if entity_id in self._state_incorrect:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue