From f684b2fd95a6ac850b32f0612def0f48ba5ecc6b Mon Sep 17 00:00:00 2001 From: scopesorting Date: Fri, 19 Jan 2024 18:07:17 +0100 Subject: [PATCH] enumerators are now IntEnum objects, which provides simpler typing. --- src/server/BreCal/database/enums.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/BreCal/database/enums.py b/src/server/BreCal/database/enums.py index 7f8fc3d..90726b3 100644 --- a/src/server/BreCal/database/enums.py +++ b/src/server/BreCal/database/enums.py @@ -11,7 +11,7 @@ class ParticipantType(IntFlag): PORT_ADMINISTRATION = 32 TUG = 64 -class ShipcallType(Enum): +class ShipcallType(IntEnum): """determines the type of a shipcall, as this changes the applicable validation rules""" INCOMING = 1 OUTGOING = 2 @@ -28,7 +28,7 @@ class ParticipantwiseTimeDelta(): NOTIFICATION = 10.0 # after n minutes, an evaluation may rise a notification -class StatusFlags(Enum): +class StatusFlags(IntEnum): """ these enumerators ensure that each traffic light validation rule state corresponds to a value, which will be used in the ValidationRules object to identify the necessity of notifications. @@ -39,6 +39,7 @@ class StatusFlags(Enum): RED = 3 class PierSide(IntEnum): + """These enumerators determine the pier side of a shipcall.""" PORTSIDE = 0 # Port/Backbord STARBOARD_SIDE = 1 # Starboard / Steuerbord