Skip to content

Commit

Permalink
minor code adjustment
Browse files Browse the repository at this point in the history
 * Preventing mixins [str -> Enum] bug in Python 3.11 [100458]
  • Loading branch information
DYefremov committed Apr 22, 2023
1 parent cd4a814 commit 4cf19e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/connections.py
Expand Up @@ -652,6 +652,9 @@ class Request(str, Enum):
N_ZAP = "zapto"
N_STREAM = "build_playlist?id="

def __str__(self):
return self.value

class Remote(str, Enum):
""" Args for HttpRequestType [REMOTE] class. """
ONE = "2"
Expand Down Expand Up @@ -686,6 +689,9 @@ class Remote(str, Enum):
NEXT = "407"
BACK = "412"

def __str__(self):
return self.value

class Power(str, Enum):
""" Args for HttpRequestType [POWER] class. """
TOGGLE_STANDBY = "0"
Expand All @@ -695,6 +701,9 @@ class Power(str, Enum):
WAKEUP = "4"
STANDBY = "5"

def __str__(self):
return self.value

PARAM_REQUESTS = {Request.REMOTE,
Request.POWER,
Request.VOL,
Expand Down

0 comments on commit 4cf19e5

Please sign in to comment.