summary refs log tree commit diff
path: root/synapse/replication
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-07-28 13:04:11 +0100
committerGitHub <noreply@github.com>2021-07-28 12:04:11 +0000
commitd9cb658c78bdb676762488d08ba44998307c781a (patch)
treef4dd98a0898cd74580fedbd6b19dbfa840998368 /synapse/replication
parentimprove typing annotations in CachedCall (#10450) (diff)
downloadsynapse-d9cb658c78bdb676762488d08ba44998307c781a.tar.xz
Fix up type hints for Twisted 21.7 (#10490)
Mostly this involves decorating a few Deferred declarations with extra type hints. We wrap the types in quotes to avoid runtime errors when running against older versions of Twisted that don't have generics on Deferred.
Diffstat (limited to 'synapse/replication')
-rw-r--r--synapse/replication/tcp/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py
index e09b857814..3fd2811713 100644
--- a/synapse/replication/tcp/client.py
+++ b/synapse/replication/tcp/client.py
@@ -285,7 +285,7 @@ class ReplicationDataHandler:
 
         # Create a new deferred that times out after N seconds, as we don't want
         # to wedge here forever.
-        deferred = Deferred()
+        deferred: "Deferred[None]" = Deferred()
         deferred = timeout_deferred(
             deferred, _WAIT_FOR_REPLICATION_TIMEOUT_SECONDS, self._reactor
         )