From 88fe871a28658acf31369f1233c30fbdc28a5011 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 6 May 2022 13:00:06 +0100 Subject: [PATCH] Remove comment that is confused about life --- synapse/metrics/background_process_metrics.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/synapse/metrics/background_process_metrics.py b/synapse/metrics/background_process_metrics.py index 368e3eef3bad..7d65ff3a4804 100644 --- a/synapse/metrics/background_process_metrics.py +++ b/synapse/metrics/background_process_metrics.py @@ -283,14 +283,6 @@ def func(*args): ... The former can be convenient if `func` needs to be run as a background process in multiple places. """ - # Note: the decorated version of `func` (`wrap_as_background_process_inner`) could be - # considered an asynchronous function. However, recent mypy versions warn us that - # we have forgotten to `await` a coroutine if we mark the decorated function as - # returning an Awaitable. - # - # error: Value of type "Coroutine[Any, Any, None]" must be used [unused-coroutine] - # note: Are you missing an await? - # It seems happier when the decorated version of `func` returns a Deferred. def wrap_as_background_process_inner( func: Callable[P, Awaitable[Optional[R]]] ) -> Callable[P, "defer.Deferred[Optional[R]]"]: