mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 17:23:55 +00:00
Use type hinting generics in standard collections (#19046)
aka PEP 585, added in Python 3.9 - https://peps.python.org/pep-0585/ - https://docs.astral.sh/ruff/rules/non-pep585-annotation/
This commit is contained in:
1 parent
cba3a814c6
commit
fc244bb592
539 files changed
+4599
-5066
No files matched your search
@@ -21,7 +21,7 @@ import email.message
|
||||
import importlib.resources as importlib_resources
|
||||
import os
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Sequence, Tuple
|
||||
from typing import Any, Sequence
|
||||
|
||||
import attr
|
||||
from parameterized import parameterized
|
||||
@@ -83,8 +83,8 @@ class EmailPusherTests(HomeserverTestCase):
|
||||
|
||||
hs = self.setup_test_homeserver(config=config)
|
||||
|
||||
# List[Tuple[Deferred, args, kwargs]]
|
||||
self.email_attempts: List[Tuple[Deferred, Sequence, Dict]] = []
|
||||
# list[tuple[Deferred, args, kwargs]]
|
||||
self.email_attempts: list[tuple[Deferred, Sequence, dict]] = []
|
||||
|
||||
def sendmail(*args: Any, **kwargs: Any) -> Deferred:
|
||||
# This mocks out synapse.reactor.send_email._sendmail.
|
||||
@@ -510,7 +510,7 @@ class EmailPusherTests(HomeserverTestCase):
|
||||
)
|
||||
self.assertEqual(len(pushers), 0)
|
||||
|
||||
def _check_for_mail(self) -> Tuple[Sequence, Dict]:
|
||||
def _check_for_mail(self) -> tuple[Sequence, dict]:
|
||||
"""
|
||||
Assert that synapse sent off exactly one email notification.
|
||||
|
||||
|
||||
Reference in new issue
Block a user