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

@@ -309,8 +309,9 @@ class SmartProtocol(BaseProtocol):
# In case the device returns empty lists avoid infinite looping
if not next_batch[response_list_name]:
_LOGGER.error(
f"Device {self._host} returned empty "
+ f"results list for method {method}"
"Device %s returned empty results list for method %s",
self._host,
method,
)
break
response_result[response_list_name].extend(next_batch[response_list_name])