diff options
author | David Robertson <davidr@element.io> | 2022-05-12 15:33:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 14:33:50 +0000 |
commit | 17e1eb7749adf12d43f534c50115bbe19c809ea6 (patch) | |
tree | b2e3e373a22432dbafe5a9e65abb98900fa3bb5d /synapse/storage/databases/main/stream.py | |
parent | add default_power_level_content_override config option. (#12618) (diff) | |
download | synapse-17e1eb7749adf12d43f534c50115bbe19c809ea6.tar.xz |
Reduce the number of "untyped defs" (#12716)
Diffstat (limited to 'synapse/storage/databases/main/stream.py')
-rw-r--r-- | synapse/storage/databases/main/stream.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/stream.py b/synapse/storage/databases/main/stream.py index 4e1d9647b7..59bbca2e32 100644 --- a/synapse/storage/databases/main/stream.py +++ b/synapse/storage/databases/main/stream.py @@ -798,9 +798,11 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore): self, txn: LoggingTransaction, event_id: str, - allow_none=False, - ) -> int: - return self.db_pool.simple_select_one_onecol_txn( + allow_none: bool = False, + ) -> Optional[int]: + # Type ignore: we pass keyvalues a Dict[str, str]; the function wants + # Dict[str, Any]. I think mypy is unhappy because Dict is invariant? + return self.db_pool.simple_select_one_onecol_txn( # type: ignore[call-overload] txn=txn, table="events", keyvalues={"event_id": event_id}, |