mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 10:53:31 +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
@@ -20,7 +20,7 @@
|
||||
#
|
||||
|
||||
from io import BytesIO
|
||||
from typing import Tuple, Union
|
||||
from typing import Union
|
||||
from unittest.mock import Mock
|
||||
|
||||
from netaddr import IPSet
|
||||
@@ -59,7 +59,7 @@ class ReadMultipartResponseTests(TestCase):
|
||||
|
||||
def _build_multipart_response(
|
||||
self, response_length: Union[int, str], max_length: int
|
||||
) -> Tuple[
|
||||
) -> tuple[
|
||||
BytesIO,
|
||||
"Deferred[MultipartResponse]",
|
||||
_MultipartParserProtocol,
|
||||
@@ -209,7 +209,7 @@ class ReadMultipartResponseTests(TestCase):
|
||||
class ReadBodyWithMaxSizeTests(TestCase):
|
||||
def _build_response(
|
||||
self, length: Union[int, str] = UNKNOWN_LENGTH
|
||||
) -> Tuple[
|
||||
) -> tuple[
|
||||
BytesIO,
|
||||
"Deferred[int]",
|
||||
_DiscardBodyWithMaxSizeProtocol,
|
||||
|
||||
Reference in new issue
Block a user