From b1be9a742a079d9fb72d37f64f1b177dfb1bd7f7 Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Tue, 22 Nov 2022 17:23:44 +0100 Subject: Add type ignore unused-awaitable to places adding callbacks to a deffered --- synapse/logging/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/logging/context.py') diff --git a/synapse/logging/context.py b/synapse/logging/context.py index f62bea968f..56972f42a6 100644 --- a/synapse/logging/context.py +++ b/synapse/logging/context.py @@ -843,7 +843,7 @@ def run_in_background( # type: ignore[misc] # which is supposed to have a single entry and exit point. But # by spawning off another deferred, we are effectively # adding a new exit point.) - res.addBoth(_set_context_cb, ctx) + res.addBoth(_set_context_cb, ctx) # type: ignore[unused-awaitable] return res @@ -870,7 +870,7 @@ def make_deferred_yieldable(deferred: "defer.Deferred[T]") -> "defer.Deferred[T] # ok, we can't be sure that a yield won't block, so let's reset the # logcontext, and add a callback to the deferred to restore it. prev_context = set_current_context(SENTINEL_CONTEXT) - deferred.addBoth(_set_context_cb, prev_context) + deferred.addBoth(_set_context_cb, prev_context) # type: ignore[unused-awaitable] return deferred -- cgit 1.5.1