Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/17411.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix linting errors from new `ruff` version.
4 changes: 3 additions & 1 deletion synapse/federation/sender/per_destination_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ def attempt_new_transaction(self) -> None:
)

async def _transaction_transmission_loop(self) -> None:
pending_pdus: List[EventBase] = []
try:
self.transmission_loop_running = True

Expand All @@ -337,11 +338,12 @@ async def _transaction_transmission_loop(self) -> None:
# not caught up yet
return

pending_pdus = []
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this reassignment necessary, we're not in a loop and haven't modified this variable yet?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was what it was previously, I just basically reverted this file. Have removed it.

while True:
self._new_data_to_send = False

async with _TransactionQueueManager(self) as (
pending_pdus,
pending_pdus, # noqa: F811
pending_edus,
):
if not pending_pdus and not pending_edus:
Expand Down