From b8f0cc25d01fb772046e1c639eefa09846387499 Mon Sep 17 00:00:00 2001 From: Lorenzo Venerandi Date: Sat, 28 Feb 2026 19:42:32 +0100 Subject: [PATCH] style: format code for better readability in DatabaseManager class --- src/database.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/database.py b/src/database.py index 6bd282b..ec4aef9 100644 --- a/src/database.py +++ b/src/database.py @@ -2136,7 +2136,9 @@ class DatabaseManager: { "ip": stat.ip, "total_requests": stat.total_requests, - "first_seen": stat.first_seen.isoformat() if stat.first_seen else None, + "first_seen": ( + stat.first_seen.isoformat() if stat.first_seen else None + ), "last_seen": stat.last_seen.isoformat() if stat.last_seen else None, "country_code": stat.country_code, "city": stat.city, @@ -2148,7 +2150,9 @@ class DatabaseManager: ] total = total_attacks + total_ips - total_pages = max(1, (max(total_attacks, total_ips) + page_size - 1) // page_size) + total_pages = max( + 1, (max(total_attacks, total_ips) + page_size - 1) // page_size + ) return { "attacks": attacks,