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
+2 -2
View File
@@ -2,7 +2,7 @@ from time import sleep
from pyhamtools.locator import latlong_to_locator
from core.enums import ActivityRefType
from core.enums import ActivityName, ActivityRefType
from data.activity_ref import ActivityRef
from providers.activityrefdata.file_download_activity_ref_data_provider import FileDownloadActivityRefDataProvider
@@ -11,7 +11,7 @@ class COTA(FileDownloadActivityRefDataProvider):
"""Activity ref data provider for Castles on the Air"""
POLL_INTERVAL_DAYS = 30
ACTIVITY = "COTA"
ACTIVITY = ActivityName.COTA
DATA_URL = "https://www.cotagroup.org/cotagroup/map/data/castles-all-7d90ee2a5e1175e5dece1bbf9dc87504.json"
def __init__(self, provider_config):