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

Fix type signature in simple_select_one_onecol and friends #8241

Merged
merged 3 commits into from
Sep 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Sneaky IDE overlords hiding overloads
Signed-off-by: Olivier Wilkinson (reivilibre) <[email protected]>
  • Loading branch information
reivilibre committed Sep 3, 2020
commit b6f97e13dfc1bef3477181489c3a64871d72d92c
11 changes: 4 additions & 7 deletions synapse/storage/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ async def simple_select_one_onecol(
self,
table: str,
keyvalues: Dict[str, Any],
retcol: Iterable[str],
retcol: str,
allow_none: Literal[False] = False,
desc: str = "simple_select_one_onecol",
) -> Any:
Expand All @@ -1115,7 +1115,7 @@ async def simple_select_one_onecol(
self,
table: str,
keyvalues: Dict[str, Any],
retcol: Iterable[str],
retcol: str,
allow_none: Literal[True] = True,
desc: str = "simple_select_one_onecol",
) -> Optional[Any]:
Expand Down Expand Up @@ -1168,7 +1168,7 @@ def simple_select_one_onecol_txn(
txn: LoggingTransaction,
table: str,
keyvalues: Dict[str, Any],
retcol: Iterable[str],
retcol: str,
allow_none: Literal[True] = True,
) -> Optional[Any]:
...
Expand Down Expand Up @@ -1196,10 +1196,7 @@ def simple_select_one_onecol_txn(

@staticmethod
def simple_select_onecol_txn(
txn: LoggingTransaction,
table: str,
keyvalues: Dict[str, Any],
retcol: str,
txn: LoggingTransaction, table: str, keyvalues: Dict[str, Any], retcol: str,
) -> List[Any]:
sql = ("SELECT %(retcol)s FROM %(table)s") % {"retcol": retcol, "table": table}

Expand Down