summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-03-08 08:25:43 -0500
committerGitHub <noreply@github.com>2021-03-08 08:25:43 -0500
commit58114f8a17a5b52a9b90b89b3c7d9b595307c9a8 (patch)
tree8695c929c3a6f61934754defcedd66912bfc13fd /synapse/server.py
parentUpdate reverse proxy to add OpenBSD relayd example configuration. (#9508) (diff)
downloadsynapse-58114f8a17a5b52a9b90b89b3c7d9b595307c9a8.tar.xz
Create a SynapseReactor type which incorporates the necessary reactor interfaces. (#9528)
This helps fix some type hints when running with Twisted 21.2.0.
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/server.py b/synapse/server.py

index afd7cd72e7..369cc88026 100644 --- a/synapse/server.py +++ b/synapse/server.py
@@ -36,7 +36,6 @@ from typing import ( cast, ) -import twisted.internet.base import twisted.internet.tcp from twisted.internet import defer from twisted.mail.smtp import sendmail @@ -130,7 +129,7 @@ from synapse.server_notices.worker_server_notices_sender import ( from synapse.state import StateHandler, StateResolutionHandler from synapse.storage import Databases, DataStore, Storage from synapse.streams.events import EventSources -from synapse.types import DomainSpecificString +from synapse.types import DomainSpecificString, ISynapseReactor from synapse.util import Clock from synapse.util.distributor import Distributor from synapse.util.ratelimitutils import FederationRateLimiter @@ -291,7 +290,7 @@ class HomeServer(metaclass=abc.ABCMeta): for i in self.REQUIRED_ON_BACKGROUND_TASK_STARTUP: getattr(self, "get_" + i + "_handler")() - def get_reactor(self) -> twisted.internet.base.ReactorBase: + def get_reactor(self) -> ISynapseReactor: """ Fetch the Twisted reactor in use by this HomeServer. """