Use ruff and ruff format (#534)

Replaces the previously used linting and code formatting tools with ruff.
This commit is contained in:
Teemu R
2023-10-29 23:15:42 +01:00
committed by GitHub
parent 0061668c9f
commit c431dbb832
26 changed files with 220 additions and 174 deletions

View File

@@ -57,7 +57,8 @@ class Module(ABC):
"""Return the module specific raw data from the last update."""
if self._module not in self._device._last_update:
raise SmartDeviceException(
f"You need to call update() prior accessing module data for '{self._module}'"
f"You need to call update() prior accessing module data"
f" for '{self._module}'"
)
return self._device._last_update[self._module]
@@ -80,4 +81,7 @@ class Module(ABC):
return self._device._create_request(self._module, query, params)
def __repr__(self) -> str:
return f"<Module {self.__class__.__name__} ({self._module}) for {self._device.host}>"
return (
f"<Module {self.__class__.__name__} ({self._module})"
f" for {self._device.host}>"
)