From 6eb1bd5ef19c0af43f7df9699c9b49ba1a8bae89 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Sat, 25 Oct 2025 10:16:15 +0100 Subject: [PATCH] Stop cleaning up comments, Spothole should be agnostic to that kind of thing. --- data/alert.py | 5 ----- data/spot.py | 8 -------- 2 files changed, 13 deletions(-) diff --git a/data/alert.py b/data/alert.py index 93f6542..7271546 100644 --- a/data/alert.py +++ b/data/alert.py @@ -111,11 +111,6 @@ class Alert: if self.dx_calls and not self.dx_names: self.dx_names = list(map(lambda c: lookup_helper.infer_name_from_callsign(c), self.dx_calls)) - # Clean up comments - if self.comment: - comment = re.sub(r"\(de [A-Za-z0-9]*\)", "", self.comment) - self.comment = comment.strip() - # Always create an ID based on a hash of every parameter *except* received_time. This is used as the index # to a map, which as a byproduct avoids us having multiple duplicate copies of the object that are identical # apart from that they were retrieved from the API at different times. Note that the simple Python hash() diff --git a/data/spot.py b/data/spot.py index c1c9616..342faca 100644 --- a/data/spot.py +++ b/data/spot.py @@ -249,14 +249,6 @@ class Spot: if self.comment and not self.qrt: self.qrt = "QRT" in self.comment.upper() - # Clean up comments - if self.comment: - comment = re.sub(r"\(de [A-Za-z0-9]*\)", "", self.comment) - comment = re.sub(r"\[.*]:", "", comment) - comment = re.sub(r"\[.*]", "", comment) - comment = re.sub(r"\"\"", "", comment) - self.comment = comment.strip() - # DX operator details lookup, using QRZ.com. This should be the last resort compared to taking the data from # the actual spotting service, e.g. we don't want to accidentally use a user's QRZ.com home lat/lon instead of # the one from the park reference they're at.