From 4cf19e54131671f6bf951f904e4f5bbc8827fb72 Mon Sep 17 00:00:00 2001 From: DYefremov Date: Sat, 22 Apr 2023 18:33:18 +0300 Subject: [PATCH] minor code adjustment * Preventing mixins [str -> Enum] bug in Python 3.11 [100458] --- app/connections.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/connections.py b/app/connections.py index 200bad02..c9f8efa7 100644 --- a/app/connections.py +++ b/app/connections.py @@ -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" @@ -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" @@ -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,