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

Add missing type hints to tests. #14687

Merged
merged 6 commits into from
Dec 28, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/14687.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing type hints.
6 changes: 4 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ exclude = (?x)
|tests/api/test_ratelimiting.py
|tests/app/test_openid_listener.py
|tests/appservice/test_scheduler.py
|tests/crypto/test_keyring.py
|tests/events/test_presence_router.py
|tests/events/test_utils.py
|tests/federation/test_federation_catch_up.py
Expand Down Expand Up @@ -90,13 +89,16 @@ disallow_untyped_defs = False
[mypy-tests.config.*]
disallow_untyped_defs = True

[mypy-tests.crypto.*]
disallow_untyped_defs = True

[mypy-tests.federation.transport.test_client]
disallow_untyped_defs = True

[mypy-tests.handlers.*]
disallow_untyped_defs = True

[mypy-tests.metrics.test_background_process_metrics]
[mypy-tests.metrics.*]
disallow_untyped_defs = True

[mypy-tests.push.test_bulk_push_rule_evaluator]
Expand Down
6 changes: 3 additions & 3 deletions tests/crypto/test_event_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@


class EventSigningTestCase(unittest.TestCase):
def setUp(self):
def setUp(self) -> None:
self.signing_key: SigningKey = decode_signing_key_base64(
KEY_ALG, KEY_VER, SIGNING_KEY_SEED
)

def test_sign_minimal(self):
def test_sign_minimal(self) -> None:
event_dict = {
"event_id": "$0:domain",
"origin": "domain",
Expand Down Expand Up @@ -69,7 +69,7 @@ def test_sign_minimal(self):
"aIbygsSdLOFzvdDjww8zUVKCmI02eP9xtyJxc/cLiBA",
)

def test_sign_message(self):
def test_sign_message(self) -> None:
event_dict = {
"content": {"body": "Here is the message content"},
"event_id": "$0:domain",
Expand Down
Loading