77import pytest
88
99if hasattr (builtins , "ExceptionGroup" ):
10- ExceptionGroup = builtins .ExceptionGroup
10+ ExceptionGroup = builtins .ExceptionGroup # type: ignore[misc]
1111else :
1212 # Fallback for older Python versions
13- ExceptionGroup = Exception
13+ ExceptionGroup = Exception # type: ignore[misc]
1414from multiaddr import Multiaddr
1515import trio
1616
@@ -820,9 +820,13 @@ async def test_wss_host_pair_data_exchange():
820820 subject = issuer = x509 .Name (
821821 [
822822 x509 .NameAttribute (NameOID .COUNTRY_NAME , "US" ), # type: ignore
823- x509 .NameAttribute (NameOID .STATE_OR_PROVINCE_NAME , "Test" ), # type: ignore
823+ x509 .NameAttribute ( # type: ignore
824+ NameOID .STATE_OR_PROVINCE_NAME , "Test"
825+ ),
824826 x509 .NameAttribute (NameOID .LOCALITY_NAME , "Test" ), # type: ignore
825- x509 .NameAttribute (NameOID .ORGANIZATION_NAME , "Test" ), # type: ignore
827+ x509 .NameAttribute ( # type: ignore
828+ NameOID .ORGANIZATION_NAME , "Test"
829+ ),
826830 x509 .NameAttribute (NameOID .COMMON_NAME , "localhost" ), # type: ignore
827831 ]
828832 )
@@ -833,9 +837,10 @@ async def test_wss_host_pair_data_exchange():
833837 .issuer_name (issuer )
834838 .public_key (private_key .public_key ())
835839 .serial_number (x509 .random_serial_number ())
836- .not_valid_before (datetime .datetime .now (datetime .UTC ))
840+ .not_valid_before (datetime .datetime .now (datetime .timezone . utc ))
837841 .not_valid_after (
838- datetime .datetime .now (datetime .UTC ) + datetime .timedelta (days = 1 )
842+ datetime .datetime .now (datetime .timezone .utc )
843+ + datetime .timedelta (days = 1 )
839844 )
840845 .add_extension (
841846 x509 .SubjectAlternativeName (
0 commit comments