From 5a5b63fa01097d95d18ac306c64a37722dc89e41 Mon Sep 17 00:00:00 2001 From: David Trattnig <david@subsquare.at> Date: Wed, 10 Aug 2022 18:37:12 +0200 Subject: [PATCH] refact: for compare inherit enum types from str --- src/aura_engine/channels.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aura_engine/channels.py b/src/aura_engine/channels.py index b078bf6a..13758cbd 100644 --- a/src/aura_engine/channels.py +++ b/src/aura_engine/channels.py @@ -29,7 +29,7 @@ from aura_engine.base.utils import SimpleUtil as SU from aura_engine.resources import ResourceType -class TransitionType(Enum): +class TransitionType(str, Enum): """ Types of fade-in and fade-out transition. """ @@ -38,7 +38,7 @@ class TransitionType(Enum): FADE = "fade" -class Channel(Enum): +class Channel(str, Enum): """ Channel name mappings to the Liqidsoap channel/source IDs. """ @@ -169,7 +169,7 @@ class ChannelType(Enum): return str(self.value["id"]) -class EntryPlayState(Enum): +class EntryPlayState(str, Enum): """Play-state of a playlist entry.""" UNKNOWN = "unknown" @@ -179,7 +179,7 @@ class EntryPlayState(Enum): FINISHED = "finished" -class LiquidsoapResponse(Enum): +class LiquidsoapResponse(str, Enum): """Response values from Liquidsoap.""" # There are some weird variations of responses coming -- GitLab