Refactor activity names to use an enum instead of a string to avoid typos #147

This commit is contained in:
Ian Renton
2026-09-18 18:09:41 +01:00
parent ab79e7e01c
commit e5caf7353d
61 changed files with 735 additions and 638 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
from datetime import datetime
from core.enums import ActivityRefType, Mode
from core.enums import Mode
from core.enums import ActivityName, ActivityRefType
from data.activity_ref import ActivityRef
from data.spot import Spot
from providers.spot.http_spot_provider import HTTPSpotProvider
@@ -34,11 +35,11 @@ class LLOTA(HTTPSpotProvider):
freq=float(source_spot["frequency"]) * 1000000,
mode=Mode.from_name(source_spot["mode"].upper()),
comment=comment,
sig="LLOTA",
sig=ActivityName.LLOTA,
sig_refs=[
ActivityRef(
id=source_spot["reference"],
sig="LLOTA",
sig=ActivityName.LLOTA,
name=source_spot["reference_name"],
ref_type=ActivityRefType.LAKE,
)