From a0346b735bc3cf78c06b1ca2ab91bd9b6623b2ec Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Sun, 12 Jan 2025 07:00:47 -0800 Subject: [PATCH] Fixed B007 (unused-loop-control-variable) --- management/status_checks.py | 2 +- tools/parse-nginx-log-bootstrap-accesses.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/management/status_checks.py b/management/status_checks.py index 29b08dc2..53c75fc2 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -1033,7 +1033,7 @@ def run_and_output_changes(env, pool): if op in {"replace", "insert"}: BufferedOutput(with_lines=cur_lines[j1:j2]).playback(out) - for category, prev_lines in prev_status.items(): + for category, _prev_lines in prev_status.items(): if category not in cur_status: out.add_heading(category) out.print_warning("This section was removed.") diff --git a/tools/parse-nginx-log-bootstrap-accesses.py b/tools/parse-nginx-log-bootstrap-accesses.py index 8eb74dec..3e769942 100755 --- a/tools/parse-nginx-log-bootstrap-accesses.py +++ b/tools/parse-nginx-log-bootstrap-accesses.py @@ -32,7 +32,7 @@ for fn in glob.glob("/var/log/nginx/access.log*"): # Aggregate by date. by_date = { } -for date, ip in accesses: +for date, _ip in accesses: by_date[date] = by_date.get(date, 0) + 1 # Since logs are rotated, store the statistics permanently in a JSON file.