Start converting some enum-like strings to proper enums

This commit is contained in:
Ian Renton
2026-09-02 07:26:02 +01:00
parent 55eaa871e9
commit fa2e4b929a
21 changed files with 132 additions and 111 deletions
+39
View File
@@ -0,0 +1,39 @@
from enum import Enum
class Continent(str, Enum):
EU = "EU"
NA = "NA"
SA = "SA"
AS = "AS"
AF = "AF"
OC = "OC"
AN = "AN"
class ModeSource(str, Enum):
"""Where the mode data came from in a spot."""
SPOT = "SPOT"
COMMENT = "COMMENT"
BANDPLAN = "BANDPLAN"
NONE = "NONE"
class LocationSourceForSpot(str, Enum):
"""Where the location data came from in a spot."""
SPOT = "SPOT"
SIG_REF_LOOKUP = "SIG REF LOOKUP"
GRID = "GRID"
HOME_QTH = "HOME QTH"
DXCC = "DXCC"
NONE = "NONE"
class LocationSourceForCallsign(str, Enum):
"""Where the location data came from in a callsign data object."""
HOME_QTH = "HOME QTH"
DXCC = "DXCC"
NONE = "NONE"