Skip to content

Commit

Permalink
Fixed type annotation for matrix-org#12437
Browse files Browse the repository at this point in the history
StreamWorkerStore.get_stream_id_for_event_txn is not declared to return Optional[int] which is consistent with it's NoneType return when the allow_none = True
  • Loading branch information
gautamgiri-dev committed Apr 13, 2022
1 parent 8e2759f commit e6afbd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ def get_stream_id_for_event_txn(
self,
txn: LoggingTransaction,
event_id: str,
allow_none=False,
) -> int:
allow_none: bool = False,
) -> Optional[int]:
return self.db_pool.simple_select_one_onecol_txn(
txn=txn,
table="events",
Expand Down

0 comments on commit e6afbd9

Please sign in to comment.