Fix mypy error on develop (#8282)

This commit is contained in:
Erik Johnston 2020-09-08 17:43:31 +01:00 committed by GitHub
parent 560f3b8609
commit 1553adc831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

1
changelog.d/8282.misc Normal file
View File

@ -0,0 +1 @@
Clean up type hints for `PaginationConfig`.

View File

@ -373,12 +373,15 @@ class PaginationHandler:
# case "JOIN" would have been returned.
assert member_event_id
leave_token = await self.store.get_topological_token_for_event(
leave_token_str = await self.store.get_topological_token_for_event(
member_event_id
)
if RoomStreamToken.parse(leave_token).topological < max_topo:
leave_token = RoomStreamToken.parse(leave_token_str)
assert leave_token.topological is not None
if leave_token.topological < max_topo:
from_token = from_token.copy_and_replace(
"room_key", leave_token
"room_key", leave_token_str
)
await self.hs.get_handlers().federation_handler.maybe_backfill(