mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-24 10:43:22 +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
@@ -13,7 +13,7 @@
|
||||
#
|
||||
import logging
|
||||
from http import HTTPStatus
|
||||
from typing import List, Optional, Tuple, cast
|
||||
from typing import Optional, cast
|
||||
|
||||
from twisted.test.proto_helpers import MemoryReactor
|
||||
|
||||
@@ -358,7 +358,7 @@ class SlidingSyncThreadSubscriptionsExtensionTestCase(SlidingSyncBase):
|
||||
using the companion /thread_subscriptions endpoint.
|
||||
"""
|
||||
|
||||
thread_root_ids: List[str] = []
|
||||
thread_root_ids: list[str] = []
|
||||
|
||||
def make_subscription() -> None:
|
||||
thread_root_resp = self.helper.send(
|
||||
@@ -455,7 +455,7 @@ class SlidingSyncThreadSubscriptionsExtensionTestCase(SlidingSyncBase):
|
||||
|
||||
def _do_backpaginate(
|
||||
self, *, from_tok: str, to_tok: str, limit: int, access_token: str
|
||||
) -> Tuple[JsonDict, Optional[str]]:
|
||||
) -> tuple[JsonDict, Optional[str]]:
|
||||
channel = self.make_request(
|
||||
"GET",
|
||||
"/_matrix/client/unstable/io.element.msc4308/thread_subscriptions"
|
||||
|
||||
Reference in new issue
Block a user