mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Refactor activity names to use an enum instead of a string to avoid typos #147
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user