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 -4
View File
@@ -19,7 +19,6 @@
#
import os.path
import subprocess
from typing import List
from incremental import Version
from zope.interface import implementer
@@ -85,7 +84,7 @@ subjectAltName = %(sanentries)s
"""
def create_test_cert_file(sanlist: List[bytes]) -> str:
def create_test_cert_file(sanlist: list[bytes]) -> str:
"""build an x509 certificate file
Args:
@@ -151,7 +150,7 @@ class TestServerTLSConnectionFactory:
"""An SSL connection creator which returns connections which present a certificate
signed by our test CA."""
def __init__(self, sanlist: List[bytes]):
def __init__(self, sanlist: list[bytes]):
"""
Args:
sanlist: a list of subjectAltName values for the cert
@@ -166,7 +165,7 @@ class TestServerTLSConnectionFactory:
def wrap_server_factory_for_tls(
factory: IProtocolFactory, clock: IReactorTime, sanlist: List[bytes]
factory: IProtocolFactory, clock: IReactorTime, sanlist: list[bytes]
) -> TLSMemoryBIOFactory:
"""Wrap an existing Protocol Factory with a test TLSMemoryBIOFactory