From 79138dfef3ad4e60669bae0a298a190af9061944 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Tue, 21 Apr 2026 11:50:08 +0200 Subject: [PATCH] report: avoid variable reuse with different types mypy will complain about `addr` because it will change from the type `str` to `int`. So use different variable names to make mypy happy. --- apport/report.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apport/report.py b/apport/report.py index c828c8b63..08a06c225 100644 --- a/apport/report.py +++ b/apport/report.py @@ -1862,11 +1862,11 @@ def crash_signature_addresses(self) -> str | None: failed = 0 for line in self["Stacktrace"].splitlines(): if line.startswith("#"): - addr = line.split()[1] - if not addr.startswith("0x"): + addr_str = line.split()[1] + if not addr_str.startswith("0x"): continue # we do want to know about ValueErrors here, so don't catch - addr = int(addr, 16) + addr = int(addr_str, 16) # ignore impossibly low addresses; these are usually artifacts # from gdb when not having debug symbols if addr < 0x1000: