Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove comment that is confused about life
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed May 6, 2022
1 parent 7c4f6dc commit 88fe871
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions synapse/metrics/background_process_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]"]:
Expand Down

0 comments on commit 88fe871

Please sign in to comment.