Skip to content

Commit

Permalink
Use 3.8-compatible typing
Browse files Browse the repository at this point in the history
  • Loading branch information
HEnquist committed Dec 12, 2023
1 parent 121d614 commit 2a41384
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions camilladsp/camilladsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2a41384

Please sign in to comment.