Skip to content

Commit 1c001c9

Browse files
committed
No need to return something
1 parent 2aa15b0 commit 1c001c9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

synapse/util/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _looping_call_common(
197197
) -> LoopingCall:
198198
"""Common functionality for `looping_call` and `looping_call_now`"""
199199

200-
def wrapped_f(*args: P.args, **kwargs: P.kwargs) -> object:
200+
def wrapped_f(*args: P.args, **kwargs: P.kwargs) -> None:
201201
assert context.current_context() is context.SENTINEL_CONTEXT, (
202202
"Expected `call_later` callback from the reactor to start with the sentinel logcontext "
203203
f"but saw {context.current_context()}. In other words, another task shouldn't have "
@@ -221,7 +221,7 @@ def wrapped_f(*args: P.args, **kwargs: P.kwargs) -> object:
221221
with context.PreserveLoggingContext(context.LoggingContext("looping_call")):
222222
# We use `run_in_background` to reset the logcontext after `f` (or the
223223
# awaitable returned by `f`) completes
224-
return context.run_in_background(f, *args, **kwargs)
224+
context.run_in_background(f, *args, **kwargs)
225225

226226
call = task.LoopingCall(wrapped_f, *args, **kwargs)
227227
call.clock = self._reactor

0 commit comments

Comments
 (0)