Add flake8-logging (LOG) and flake8-logging-format (G) for ruff (#1104)

Enables rules LOG (flake8-logging) and G (flake8-logging-format) for
ruff. This will catch eager log message formatting, among other similar
issues.
This commit is contained in:
Teemu R.
2024-08-30 16:13:14 +02:00
committed by GitHub
parent 2706e9a5be
commit 3e43781bb2
11 changed files with 33 additions and 26 deletions

View File

@@ -181,7 +181,7 @@ class Firmware(SmartModule):
)
continue
_LOGGER.debug("Update state: %s" % state)
_LOGGER.debug("Update state: %s", state)
if progress_cb is not None:
asyncio.create_task(progress_cb(state))

View File

@@ -77,7 +77,7 @@ class SmartModule(Module):
def __init_subclass__(cls, **kwargs):
name = getattr(cls, "NAME", cls.__name__)
_LOGGER.debug("Registering %s" % cls)
_LOGGER.debug("Registering %s", cls)
cls.REGISTERED_MODULES[name] = cls
def _set_error(self, err: Exception | None):