summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathieu Velten <mathieuv@matrix.org>2022-11-22 17:21:28 +0100
committerMathieu Velten <mathieuv@matrix.org>2022-11-22 18:10:08 +0100
commitadc79037629af307dab5044029d02110dd6edb69 (patch)
treed14470316002ae87829745636e75c1029cb9418e
parentAdd type ignore to calls of fcts using wrap_as_background_process (diff)
downloadsynapse-adc79037629af307dab5044029d02110dd6edb69.tar.xz
Add type ignore unused-awaitable to ensureDeffered calls
-rw-r--r--synapse/_scripts/update_synapse_database.py2
-rw-r--r--tests/http/test_matrixfederationclient.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/_scripts/update_synapse_database.py b/synapse/_scripts/update_synapse_database.py
index 0adf94bba6..5ae5f9e297 100644
--- a/synapse/_scripts/update_synapse_database.py
+++ b/synapse/_scripts/update_synapse_database.py
@@ -59,7 +59,7 @@ def run_background_updates(hs: HomeServer) -> None:
 
     def run() -> None:
         # Apply all background updates on the database.
-        defer.ensureDeferred(
+        defer.ensureDeferred( # type: ignore[unused-awaitable]
             run_as_background_process("background_updates", run_background_updates)
         )
 
diff --git a/tests/http/test_matrixfederationclient.py b/tests/http/test_matrixfederationclient.py
index be9eaf34e8..56fb34a1c3 100644
--- a/tests/http/test_matrixfederationclient.py
+++ b/tests/http/test_matrixfederationclient.py
@@ -451,7 +451,7 @@ class FederationClientTests(HomeserverTestCase):
         self.failureResultOf(d)
 
     def test_client_sends_body(self):
-        defer.ensureDeferred(
+        defer.ensureDeferred( # type: ignore[unused-awaitable]
             self.cl.post_json(
                 "testserv:8008", "foo/bar", timeout=10000, data={"a": "b"}
             )