Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e7fb656

Browse files
committed
Add an overload for simple_select_one_onecol_txn.
1 parent 912e024 commit e7fb656

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

changelog.d/8235.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add type hints to `StreamStore`.

synapse/storage/database.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,30 @@ async def simple_select_one_onecol(
11491149
allow_none=allow_none,
11501150
)
11511151

1152+
@overload
1153+
@classmethod
1154+
def simple_select_one_onecol_txn(
1155+
cls,
1156+
txn: LoggingTransaction,
1157+
table: str,
1158+
keyvalues: Dict[str, Any],
1159+
retcol: Iterable[str],
1160+
allow_none: Literal[False] = False,
1161+
) -> Any:
1162+
...
1163+
1164+
@overload
1165+
@classmethod
1166+
def simple_select_one_onecol_txn(
1167+
cls,
1168+
txn: LoggingTransaction,
1169+
table: str,
1170+
keyvalues: Dict[str, Any],
1171+
retcol: Iterable[str],
1172+
allow_none: Literal[True] = True,
1173+
) -> Optional[Any]:
1174+
...
1175+
11521176
@classmethod
11531177
def simple_select_one_onecol_txn(
11541178
cls,

0 commit comments

Comments
 (0)