1
0

Suppress false positives from mypy

This commit is contained in:
David Robertson
2022-10-01 23:57:19 +01:00
parent f8fd5ddefe
commit 684f336c43
2 changed files with 8 additions and 1 deletions
+5 -1
View File
@@ -1684,7 +1684,11 @@ class DatabasePool:
table,
keyvalues,
retcol,
allow_none=allow_none,
# Type ignore suppresses a mypy bug:
# Argument "allow_none" to "runInteraction_advanced" of "DatabasePool"
# has incompatible type "bool"; expected "Literal[False]" [arg-type]
# I think mypy is confused by the overloads of simple_select_one_onecol_txn.
allow_none=allow_none, # type:ignore[arg-type]
)
@overload
+3
View File
@@ -547,6 +547,9 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore):
return state_group
if prev_group is not None:
# This assertion is for mypy's benefit and is checked above.
assert delta_ids is not None
state_group = await self.db_pool.runInteraction(
"store_state_group.insert_delta_group",
insert_delta_group_txn,