Skip to content

Commit

Permalink
receive_patch should always return a List
Browse files Browse the repository at this point in the history
  • Loading branch information
samcarsonx committed Jul 11, 2023
1 parent 613f740 commit d19884e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions goxlr/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def receive(self, id: IDType | int = None):
continue
self.response_queue.append(response)

async def receive_patch(self) -> Patch | List[Patch]:
async def receive_patch(self) -> List[Patch]:
"""
Helper method to wait for a patch message from the daemon.
Expand All @@ -127,9 +127,6 @@ async def receive_patch(self) -> Patch | List[Patch]:
response = await self.receive(IDType.Patch)
patches = response.get("data").get("Patch")

if len(patches) == 1:
return Patch(patches[0])

return [Patch(p) for p in patches]

async def open(self):
Expand Down Expand Up @@ -202,7 +199,7 @@ async def update(self):

return self.status

async def receive_patch(self, update: bool = True) -> Patch | List[Patch]:
async def receive_patch(self, update: bool = True) -> List[Patch]:
"""
Helper method to wait for a patch message from the daemon.
Expand Down

0 comments on commit d19884e

Please sign in to comment.