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:
Andrew Ferrazzutti authored and GitHub committed 2025-10-22 16:48:19 -05:00
1 parent cba3a814c6
commit fc244bb592
539 files changed
+4599 -5066

No files matched your search

+3 -3
View File
@@ -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,