From 028b103ae0d2ce82ea240b06e890a521ec2d6e6c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 9 Jul 2024 11:04:40 +0100 Subject: [PATCH] Fix exception when failing to talk to remote server (#17411) Broke in #17381 --- changelog.d/17411.misc | 1 + synapse/federation/sender/per_destination_queue.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/17411.misc diff --git a/changelog.d/17411.misc b/changelog.d/17411.misc new file mode 100644 index 00000000000..ca9830c1368 --- /dev/null +++ b/changelog.d/17411.misc @@ -0,0 +1 @@ +Fix linting errors from new `ruff` version. diff --git a/synapse/federation/sender/per_destination_queue.py b/synapse/federation/sender/per_destination_queue.py index b435588da0e..d097e65ea74 100644 --- a/synapse/federation/sender/per_destination_queue.py +++ b/synapse/federation/sender/per_destination_queue.py @@ -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 @@ -341,7 +342,7 @@ async def _transaction_transmission_loop(self) -> None: 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: