summary refs log tree commit diff
path: root/stubs
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-10-02 09:57:12 +0100
committerGitHub <noreply@github.com>2020-10-02 09:57:12 +0100
commit6c5d5e507e629cf57ae8c1034879e8ffaef33e9f (patch)
treed7f1840507fca7a59ef0ffe0c5aafcff26274cae /stubs
parentAdd config option for always using "userinfo endpoint" for OIDC (#7658) (diff)
downloadsynapse-6c5d5e507e629cf57ae8c1034879e8ffaef33e9f.tar.xz
Add unit test for event persister sharding (#8433)
Diffstat (limited to 'stubs')
-rw-r--r--stubs/txredisapi.pyi20
1 files changed, 19 insertions, 1 deletions
diff --git a/stubs/txredisapi.pyi b/stubs/txredisapi.pyi
index c66413f003..522244bb57 100644
--- a/stubs/txredisapi.pyi
+++ b/stubs/txredisapi.pyi
@@ -16,7 +16,7 @@
 """Contains *incomplete* type hints for txredisapi.
 """
 
-from typing import List, Optional, Union
+from typing import List, Optional, Union, Type
 
 class RedisProtocol:
     def publish(self, channel: str, message: bytes): ...
@@ -42,3 +42,21 @@ def lazyConnection(
 
 class SubscriberFactory:
     def buildProtocol(self, addr): ...
+
+class ConnectionHandler: ...
+
+class RedisFactory:
+    continueTrying: bool
+    handler: RedisProtocol
+    def __init__(
+        self,
+        uuid: str,
+        dbid: Optional[int],
+        poolsize: int,
+        isLazy: bool = False,
+        handler: Type = ConnectionHandler,
+        charset: str = "utf-8",
+        password: Optional[str] = None,
+        replyTimeout: Optional[int] = None,
+        convertNumbers: Optional[int] = True,
+    ): ...