0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-16 09:38:19 +02:00

Add an overload for simple_select_one_onecol_txn. (#8235)

This commit is contained in:
Patrick Cloke 2020-09-02 15:03:12 -04:00 committed by GitHub
parent 912e024913
commit c8758cb72f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

1
changelog.d/8235.misc Normal file
View file

@ -0,0 +1 @@
Add type hints to `StreamStore`.

View file

@ -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,