From 2a41384aa8f20c5885c77786728721d85ceda0a2 Mon Sep 17 00:00:00 2001 From: Henrik Date: Tue, 12 Dec 2023 21:44:56 +0100 Subject: [PATCH] Use 3.8-compatible typing --- camilladsp/camilladsp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camilladsp/camilladsp.py b/camilladsp/camilladsp.py index 239b55d..965fe32 100644 --- a/camilladsp/camilladsp.py +++ b/camilladsp/camilladsp.py @@ -14,7 +14,7 @@ import json import math -from typing import Dict, Tuple, List, Optional +from typing import Dict, Tuple, List, Optional, Union from threading import Lock import yaml from websocket import create_connection, WebSocket # type: ignore @@ -77,7 +77,7 @@ def query(self, command: str, arg=None): raise IOError("Lost connection to CamillaDSP") from err return self._handle_reply(command, rawrepl) - def _handle_reply(self, command: str, rawreply: str|bytes): + def _handle_reply(self, command: str, rawreply: Union[str, bytes]): try: reply = json.loads(rawreply) value = None