mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 23:53:58 +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
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user