From c8758cb72fccc5594ce8da7ccd2256315a8aa27e Mon Sep 17 00:00:00 2001
From: Patrick Cloke <clokep@users.noreply.github.com>
Date: Wed, 2 Sep 2020 15:03:12 -0400
Subject: [PATCH] Add an overload for simple_select_one_onecol_txn. (#8235)

---
 changelog.d/8235.misc       |  1 +
 synapse/storage/database.py | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 changelog.d/8235.misc

diff --git a/changelog.d/8235.misc b/changelog.d/8235.misc
new file mode 100644
index 0000000000..3a7a352c4f
--- /dev/null
+++ b/changelog.d/8235.misc
@@ -0,0 +1 @@
+Add type hints to `StreamStore`.
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index 8851710d47..78ca6d8346 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -1149,6 +1149,30 @@ class DatabasePool(object):
             allow_none=allow_none,
         )
 
+    @overload
+    @classmethod
+    def simple_select_one_onecol_txn(
+        cls,
+        txn: LoggingTransaction,
+        table: str,
+        keyvalues: Dict[str, Any],
+        retcol: Iterable[str],
+        allow_none: Literal[False] = False,
+    ) -> Any:
+        ...
+
+    @overload
+    @classmethod
+    def simple_select_one_onecol_txn(
+        cls,
+        txn: LoggingTransaction,
+        table: str,
+        keyvalues: Dict[str, Any],
+        retcol: Iterable[str],
+        allow_none: Literal[True] = True,
+    ) -> Optional[Any]:
+        ...
+
     @classmethod
     def simple_select_one_onecol_txn(
         cls,
-- 
GitLab