Add final type hint to tests.unittest. (#15072)

Adds a return type to HomeServerTestCase.make_homeserver and deal
with any variables which are no longer Any.
This commit is contained in:
Patrick Cloke 2023-02-14 14:03:35 -05:00 committed by GitHub
parent 119e0795a5
commit 42aea0d8af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 433 additions and 320 deletions

View file

@ -2913,7 +2913,8 @@ class UserMembershipRestTestCase(unittest.HomeserverTestCase):
other_user_tok = self.login("user", "pass")
event_builder_factory = self.hs.get_event_builder_factory()
event_creation_handler = self.hs.get_event_creation_handler()
storage_controllers = self.hs.get_storage_controllers()
persistence = self.hs.get_storage_controllers().persistence
assert persistence is not None
# Create two rooms, one with a local user only and one with both a local
# and remote user.
@ -2940,7 +2941,7 @@ class UserMembershipRestTestCase(unittest.HomeserverTestCase):
context = self.get_success(unpersisted_context.persist(event))
self.get_success(storage_controllers.persistence.persist_event(event, context))
self.get_success(persistence.persist_event(event, context))
# Now get rooms
url = "/_synapse/admin/v1/users/@joiner:remote_hs/joined_rooms"