Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Proper types for tests.module_api #15031

Merged
merged 6 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15031.misc
@@ -0,0 +1 @@
Improve type hints.
1 change: 0 additions & 1 deletion mypy.ini
Expand Up @@ -32,7 +32,6 @@ exclude = (?x)
|synapse/storage/databases/main/cache.py
|synapse/storage/schema/

|tests/module_api/test_api.py
|tests/server.py
)$

Expand Down
10 changes: 7 additions & 3 deletions tests/events/test_presence_router.py
Expand Up @@ -31,7 +31,11 @@

from tests.handlers.test_sync import generate_sync_config
from tests.test_utils import simple_async_mock
from tests.unittest import FederatingHomeserverTestCase, override_config
from tests.unittest import (
FederatingHomeserverTestCase,
HomeserverTestCase,
override_config,
)


@attr.s
Expand Down Expand Up @@ -470,7 +474,7 @@ def send_local_online_presence_to_with_module_test_body(self) -> None:


def send_presence_update(
testcase: FederatingHomeserverTestCase,
testcase: HomeserverTestCase,
user_id: str,
access_token: str,
presence_state: str,
Expand All @@ -491,7 +495,7 @@ def send_presence_update(


def sync_presence(
testcase: FederatingHomeserverTestCase,
testcase: HomeserverTestCase,
user_id: str,
since_token: Optional[StreamToken] = None,
) -> Tuple[List[UserPresenceState], StreamToken]:
Expand Down