diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-11-10 15:06:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 15:06:54 -0500 |
commit | 5cace20bf1f3c50ea50d56a938c4eee5825f4b84 (patch) | |
tree | eb926831cf00aabe5c43a32dfae9256d83e4fb07 /synapse/util/manhole.py | |
parent | Add type hints to synapse._scripts (#11297) (diff) | |
download | synapse-5cace20bf1f3c50ea50d56a938c4eee5825f4b84.tar.xz |
Add missing type hints to `synapse.app`. (#11287)
Diffstat (limited to 'synapse/util/manhole.py')
-rw-r--r-- | synapse/util/manhole.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/util/manhole.py b/synapse/util/manhole.py index f8b2d7bea9..48b8195ca1 100644 --- a/synapse/util/manhole.py +++ b/synapse/util/manhole.py @@ -23,7 +23,7 @@ from twisted.conch.manhole import ColoredManhole, ManholeInterpreter from twisted.conch.ssh.keys import Key from twisted.cred import checkers, portal from twisted.internet import defer -from twisted.internet.protocol import Factory +from twisted.internet.protocol import ServerFactory from synapse.config.server import ManholeConfig @@ -65,7 +65,7 @@ EddTrx3TNpr1D5m/f+6mnXWrc8u9y1+GNx9yz889xMjIBTBI9KqaaOs= -----END RSA PRIVATE KEY-----""" -def manhole(settings: ManholeConfig, globals: Dict[str, Any]) -> Factory: +def manhole(settings: ManholeConfig, globals: Dict[str, Any]) -> ServerFactory: """Starts a ssh listener with password authentication using the given username and password. Clients connecting to the ssh listener will find themselves in a colored python shell with @@ -105,7 +105,8 @@ def manhole(settings: ManholeConfig, globals: Dict[str, Any]) -> Factory: factory.privateKeys[b"ssh-rsa"] = priv_key # type: ignore[assignment] factory.publicKeys[b"ssh-rsa"] = pub_key # type: ignore[assignment] - return factory + # ConchFactory is a Factory, not a ServerFactory, but they are identical. + return factory # type: ignore[return-value] class SynapseManhole(ColoredManhole): |