Skip to content

Commit

Permalink
Pick changes suggested by pyupgrade --py38-plus.
Browse files Browse the repository at this point in the history
Other changes were ignored, on purpose.
  • Loading branch information
aaugustin committed Jul 12, 2024
1 parent cd059d5 commit f45286b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/websockets/sync/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def __init__(self) -> None:
# value marking the end of the message, superseding message_complete.

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

# This flag marks the end of the connection.
self.closed = False
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy/test_client_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def default_handler(ws):
await ws.wait_closed()
await asyncio.sleep(2 * MS)
else:
await ws.send((await ws.recv()))
await ws.send(await ws.recv())


async def redirect_request(path, headers, test, status):
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ def assertDeprecationWarnings(self, recorded_warnings, expected_warnings):
for recorded in recorded_warnings:
self.assertEqual(type(recorded.message), DeprecationWarning)
self.assertEqual(
set(str(recorded.message) for recorded in recorded_warnings),
{str(recorded.message) for recorded in recorded_warnings},
set(expected_warnings),
)

0 comments on commit f45286b

Please sign in to comment.