Fix incorrect type hints for txredis. (#12042)

Some properties were marked as RedisProtocol instead of ConnectionHandler,
which wraps RedisProtocol instance(s).
This commit is contained in:
Patrick Cloke 2022-03-08 07:26:05 -05:00 committed by GitHub
parent 26211fec24
commit d8bab6793c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 10 deletions

View file

@ -145,7 +145,7 @@ from synapse.util.stringutils import random_string
logger = logging.getLogger(__name__)
if TYPE_CHECKING:
from txredisapi import RedisProtocol
from txredisapi import ConnectionHandler
from synapse.handlers.oidc import OidcHandler
from synapse.handlers.saml import SamlHandler
@ -807,7 +807,7 @@ class HomeServer(metaclass=abc.ABCMeta):
return AccountHandler(self)
@cache_in_self
def get_outbound_redis_connection(self) -> "RedisProtocol":
def get_outbound_redis_connection(self) -> "ConnectionHandler":
"""
The Redis connection used for replication.