Enable Ruff RUF010 (#115371)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Sid 2024-05-08 23:54:49 +02:00 committed by GitHub
parent 589104f63d
commit ac54cdcdb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 88 additions and 95 deletions

View file

@ -55,7 +55,7 @@ class SwitchBeeSomfyEntity(SwitchBeeDeviceEntity[SwitchBeeSomfy], CoverEntity):
await self.coordinator.api.set_state(self._device.id, command)
except (SwitchBeeError, SwitchBeeTokenError) as exp:
raise HomeAssistantError(
f"Failed to fire {command} for {self.name}, {str(exp)}"
f"Failed to fire {command} for {self.name}, {exp!s}"
) from exp
async def async_open_cover(self, **kwargs: Any) -> None:
@ -145,7 +145,7 @@ class SwitchBeeCoverEntity(SwitchBeeDeviceEntity[SwitchBeeShutter], CoverEntity)
except (SwitchBeeError, SwitchBeeTokenError) as exp:
raise HomeAssistantError(
f"Failed to set {self.name} position to {kwargs[ATTR_POSITION]}, error:"
f" {str(exp)}"
f" {exp!s}"
) from exp
self._get_coordinator_device().position = kwargs[ATTR_POSITION]