Suppress false positives from mypy
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user