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

Commit

Permalink
Add an overload for simple_select_one_onecol_txn.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Sep 2, 2020
1 parent 912e024 commit e7fb656
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/8235.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add type hints to `StreamStore`.
24 changes: 24 additions & 0 deletions synapse/storage/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,30 @@ async def simple_select_one_onecol(
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,
Expand Down

0 comments on commit e7fb656

Please sign in to comment.