mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 03:44:56 -04:00
Use inline type hints in http/federation/
, storage/
and util/
(#10381)
This commit is contained in:
parent
3acf85c85f
commit
bdfde6dca1
38 changed files with 149 additions and 161 deletions
|
@ -1085,9 +1085,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore, metaclass=abc.ABCMeta):
|
|||
# stream token (as returned by `RoomStreamToken.get_max_stream_pos`) and
|
||||
# then filtering the results.
|
||||
if from_token.topological is not None:
|
||||
from_bound = (
|
||||
from_token.as_historical_tuple()
|
||||
) # type: Tuple[Optional[int], int]
|
||||
from_bound: Tuple[Optional[int], int] = from_token.as_historical_tuple()
|
||||
elif direction == "b":
|
||||
from_bound = (
|
||||
None,
|
||||
|
@ -1099,7 +1097,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore, metaclass=abc.ABCMeta):
|
|||
from_token.stream,
|
||||
)
|
||||
|
||||
to_bound = None # type: Optional[Tuple[Optional[int], int]]
|
||||
to_bound: Optional[Tuple[Optional[int], int]] = None
|
||||
if to_token:
|
||||
if to_token.topological is not None:
|
||||
to_bound = to_token.as_historical_tuple()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue