Skip to content

Commit fc0d30e

Browse files
committed
Address sonarcloud cosmetic comments
1 parent e1bf7d8 commit fc0d30e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/websocket2serial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async def websocket_to_serial_task(serial_port_name, websocket, ser):
119119
break # Exit task if client disconnects
120120
except websockets.exceptions.ConnectionClosed as e:
121121
logging.warning(
122-
f"WS -> Serial: WebSocket connection closed " f"unexpectedly: {e}"
122+
f"WS -> Serial: WebSocket connection closed unexpectedly: {e}"
123123
)
124124
break # Exit task on unexpected connection closure
125125
except Exception as e:
@@ -193,7 +193,7 @@ async def serial_websocket_handler(serial_port_name, baud_rate, websocket):
193193

194194
# Wait for both tasks to complete (e.g., if WebSocket disconnects
195195
# or an error occurs)
196-
done, pending = await asyncio.wait(
196+
_, pending = await asyncio.wait(
197197
[producer_task, consumer_task],
198198
return_when=asyncio.FIRST_COMPLETED, # Stop if one task completes
199199
)

0 commit comments

Comments
 (0)