From bbc312452778619cb14fce7b207e51463151c9a4 Mon Sep 17 00:00:00 2001 From: Ivan Pavlina Date: Mon, 11 May 2020 15:18:17 +0200 Subject: [PATCH] Another try to pass Black :D --- .../mikrotik_router/mikrotik_controller.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/custom_components/mikrotik_router/mikrotik_controller.py b/custom_components/mikrotik_router/mikrotik_controller.py index 0eb4c21..a089d4f 100644 --- a/custom_components/mikrotik_router/mikrotik_controller.py +++ b/custom_components/mikrotik_router/mikrotik_controller.py @@ -1183,14 +1183,18 @@ class MikrotikControllerData: entry_count = len(accounting_data) if entry_count is threshold: - _LOGGER.warning(f"Accounting entries count reached the threshold of {threshold}!" - " Some entries were not saved by Mikrotik so accounting calculation won't be correct." - " Consider shortening update interval or" - " increasing the accounting threshold value in Mikrotik.") + _LOGGER.warning( + f"Accounting entries count reached the threshold of {threshold}!" + " Some entries were not saved by Mikrotik so accounting calculation won't be correct." + " Consider shortening update interval or" + " increasing the accounting threshold value in Mikrotik." + ) elif entry_count > threshold * 0.9: - _LOGGER.info(f"Accounting entries count ({entry_count} reached 90% of the threshold," - f" currently set to {threshold}! Consider shortening update interval or" - " increasing the accounting threshold value in Mikrotik.") + _LOGGER.info( + f"Accounting entries count ({entry_count} reached 90% of the threshold," + f" currently set to {threshold}! Consider shortening update interval or" + " increasing the accounting threshold value in Mikrotik." + ) for item in accounting_data.values(): source_ip = str(item.get("src-address")).strip()