mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 22:04:56 -04:00
Create a SynapseReactor type which incorporates the necessary reactor interfaces. (#9528)
This helps fix some type hints when running with Twisted 21.2.0.
This commit is contained in:
parent
0fc4eb103a
commit
58114f8a17
8 changed files with 32 additions and 12 deletions
|
@ -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.
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue