Skip to content

Commit b505eb6

Browse files
committed
Address CI fail
1 parent ec54d9e commit b505eb6

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

libp2p/pubsub/pubsub.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,9 +883,7 @@ async def write_msg(self, stream: INetStream, rpc_msg: rpc_pb2.RPC) -> bool:
883883
Write an RPC message to a stream with proper error handling.
884884
885885
Implements WriteMsg similar to go-msgio which is used in go-libp2p
886-
Ref: https://github.com/libp2p/go-msgio/blob/master/protoio/
887-
uvarint_writer.go#L56
888-
886+
Ref: https://github.com/libp2p/go-msgio/blob/master/protoio/uvarint_writer.go#L56
889887
890888
:param stream: stream to write the message to
891889
:param rpc_msg: RPC message to write

tests/core/transport/test_websocket.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import pytest
88

99
if hasattr(builtins, "ExceptionGroup"):
10-
ExceptionGroup = builtins.ExceptionGroup
10+
ExceptionGroup = builtins.ExceptionGroup # type: ignore[misc]
1111
else:
1212
# Fallback for older Python versions
13-
ExceptionGroup = Exception
13+
ExceptionGroup = Exception # type: ignore[misc]
1414
from multiaddr import Multiaddr
1515
import 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

Comments
 (0)