mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-11 18:08:02 +00:00
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:
@@ -84,8 +84,11 @@ async def _connect(config: DeviceConfig, protocol: BaseProtocol) -> Device:
|
||||
if debug_enabled:
|
||||
end_time = time.perf_counter()
|
||||
_LOGGER.debug(
|
||||
f"Device {config.host} with connection params {has_params} "
|
||||
+ f"took {end_time - start_time:.2f} seconds to {perf_type}",
|
||||
"Device %s with connection params %s took %.2f seconds to %s",
|
||||
config.host,
|
||||
has_params,
|
||||
end_time - start_time,
|
||||
perf_type,
|
||||
)
|
||||
start_time = time.perf_counter()
|
||||
|
||||
|
Reference in New Issue
Block a user