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

@ -13,7 +13,7 @@
# limitations under the License.
from unittest.mock import Mock
from synapse.handlers.typing import RoomMember
from synapse.handlers.typing import RoomMember, TypingWriterHandler
from synapse.replication.tcp.streams import TypingStream
from synapse.util.caches.stream_change_cache import StreamChangeCache
@ -33,6 +33,7 @@ class TypingStreamTestCase(BaseStreamTestCase):
def test_typing(self) -> None:
typing = self.hs.get_typing_handler()
assert isinstance(typing, TypingWriterHandler)
self.reconnect()
@ -88,6 +89,7 @@ class TypingStreamTestCase(BaseStreamTestCase):
sends the proper position and RDATA).
"""
typing = self.hs.get_typing_handler()
assert isinstance(typing, TypingWriterHandler)
self.reconnect()