Global autoformat

This commit is contained in:
Ian Renton
2026-06-19 21:36:11 +01:00
parent edb2641f76
commit 07d0d98f3d
65 changed files with 1250 additions and 844 deletions

View File

@@ -30,7 +30,8 @@ class Tiles(HTTPSpotProvider):
sig="Tiles",
# Tiles spots can include POTA & SOTA references, but ignore those on the basis that we will get them separately from the POTA/SOTA providers anyway.
# Just take the grid reference itself as the single Tiles SIG reference.
sig_refs=[SIGRef(id=source_spot["maidenhead_grid"], sig="Tiles", name=source_spot["maidenhead_grid"])],
sig_refs=[SIGRef(id=source_spot["maidenhead_grid"], sig="Tiles",
name=source_spot["maidenhead_grid"])],
time=datetime.fromisoformat(source_spot["created_at"].replace("Z", "+00:00")).timestamp(),
dx_grid=source_spot["maidenhead_grid"],
dx_latitude=source_spot["latitude"],
@@ -41,10 +42,11 @@ class Tiles(HTTPSpotProvider):
new_spots.append(spot)
return new_spots
# Utility function to keep the first decimal point in a given string but remove any others. Used to parse Tiles'
# strange frequency format where we can sometimes have e.g. "14.123.5".
def strip_extra_decimal_points(s):
parts = s.split('.', 1)
if len(parts) == 1:
return s
return parts[0] + '.' + parts[1].replace('.', '')
return parts[0] + '.' + parts[1].replace('.', '')