enumerators are now IntEnum objects, which provides simpler typing.

This commit is contained in:
scopesorting 2024-01-19 18:07:17 +01:00 committed by Max Metz
parent 73d13d4d62
commit f684b2fd95

View File

@ -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