diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-03-29 11:43:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 11:43:20 -0400 |
commit | da75d2ea1f2784791399dbeba16be401e2bb37d2 (patch) | |
tree | 1ccbaf8cec32418a1cdbaae8b9197f6dc2c0bea1 /synapse/server.py | |
parent | Update the OIDC sample config (#9695) (diff) | |
download | synapse-da75d2ea1f2784791399dbeba16be401e2bb37d2.tar.xz |
Add type hints for the federation sender. (#9681)
Includes an abstract base class which both the FederationSender and the FederationRemoteSendQueue must implement.
Diffstat (limited to '')
-rw-r--r-- | synapse/server.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/server.py b/synapse/server.py index 5e787e2281..e85b9391fa 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -60,7 +60,7 @@ from synapse.federation.federation_server import ( FederationServer, ) from synapse.federation.send_queue import FederationRemoteSendQueue -from synapse.federation.sender import FederationSender +from synapse.federation.sender import AbstractFederationSender, FederationSender from synapse.federation.transport.client import TransportLayerClient from synapse.groups.attestations import GroupAttestationSigning, GroupAttestionRenewer from synapse.groups.groups_server import GroupsServerHandler, GroupsServerWorkerHandler @@ -571,7 +571,7 @@ class HomeServer(metaclass=abc.ABCMeta): return TransportLayerClient(self) @cache_in_self - def get_federation_sender(self): + def get_federation_sender(self) -> AbstractFederationSender: if self.should_send_federation(): return FederationSender(self) elif not self.config.worker_app: |