mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 01:04:48 -04:00
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:
parent
26211fec24
commit
d8bab6793c
5 changed files with 14 additions and 10 deletions
|
@ -21,7 +21,7 @@ from synapse.logging.context import make_deferred_yieldable
|
|||
from synapse.util import json_decoder, json_encoder
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from txredisapi import RedisProtocol
|
||||
from txredisapi import ConnectionHandler
|
||||
|
||||
from synapse.server import HomeServer
|
||||
|
||||
|
@ -63,7 +63,7 @@ class ExternalCache:
|
|||
def __init__(self, hs: "HomeServer"):
|
||||
if hs.config.redis.redis_enabled:
|
||||
self._redis_connection: Optional[
|
||||
"RedisProtocol"
|
||||
"ConnectionHandler"
|
||||
] = hs.get_outbound_redis_connection()
|
||||
else:
|
||||
self._redis_connection = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue