mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 06:30:53 +00:00
Run black and isort w/ the new config
This commit is contained in:
@ -90,7 +90,9 @@ class Mplex(IMuxedConn):
|
||||
# Stream not created yet
|
||||
return None
|
||||
|
||||
async def open_stream(self, protocol_id: str, multi_addr: Multiaddr) -> IMuxedStream:
|
||||
async def open_stream(
|
||||
self, protocol_id: str, multi_addr: Multiaddr
|
||||
) -> IMuxedStream:
|
||||
"""
|
||||
creates a new muxed_stream
|
||||
:param protocol_id: protocol_id of stream
|
||||
@ -177,7 +179,9 @@ class Mplex(IMuxedConn):
|
||||
try:
|
||||
header = await decode_uvarint_from_stream(self.raw_conn.reader, timeout)
|
||||
length = await decode_uvarint_from_stream(self.raw_conn.reader, timeout)
|
||||
message = await asyncio.wait_for(self.raw_conn.reader.read(length), timeout=timeout)
|
||||
message = await asyncio.wait_for(
|
||||
self.raw_conn.reader.read(length), timeout=timeout
|
||||
)
|
||||
except asyncio.TimeoutError:
|
||||
return None, None, None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user