Skip to content

Commit f45286b

Browse files
committed
Pick changes suggested by pyupgrade --py38-plus.
Other changes were ignored, on purpose.
1 parent cd059d5 commit f45286b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/websockets/sync/messages.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def __init__(self) -> None:
5353
# value marking the end of the message, superseding message_complete.
5454

5555
# Stream data from frames belonging to the same message.
56-
# Remove quotes around type when dropping Python < 3.9.
57-
self.chunks_queue: "queue.SimpleQueue[Data | None] | None" = None
56+
self.chunks_queue: queue.SimpleQueue[Data | None] | None = None
5857

5958
# This flag marks the end of the connection.
6059
self.closed = False

tests/legacy/test_client_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async def default_handler(ws):
6565
await ws.wait_closed()
6666
await asyncio.sleep(2 * MS)
6767
else:
68-
await ws.send((await ws.recv()))
68+
await ws.send(await ws.recv())
6969

7070

7171
async def redirect_request(path, headers, test, status):

tests/legacy/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ def assertDeprecationWarnings(self, recorded_warnings, expected_warnings):
7979
for recorded in recorded_warnings:
8080
self.assertEqual(type(recorded.message), DeprecationWarning)
8181
self.assertEqual(
82-
set(str(recorded.message) for recorded in recorded_warnings),
82+
{str(recorded.message) for recorded in recorded_warnings},
8383
set(expected_warnings),
8484
)

0 commit comments

Comments
 (0)