mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
run black
This commit is contained in:
@ -30,9 +30,7 @@ class TCPListener(IListener):
|
||||
:return: return True if successful
|
||||
"""
|
||||
self.server = await asyncio.start_server(
|
||||
self.handler,
|
||||
maddr.value_for_protocol("ip4"),
|
||||
maddr.value_for_protocol("tcp"),
|
||||
self.handler, maddr.value_for_protocol("ip4"), maddr.value_for_protocol("tcp")
|
||||
)
|
||||
socket = self.server.sockets[0]
|
||||
self.multiaddrs.append(_multiaddr_from_socket(socket))
|
||||
|
||||
@ -3,4 +3,3 @@ from typing import NewType, Callable
|
||||
|
||||
|
||||
THandler = Callable[[StreamReader, StreamWriter], None]
|
||||
|
||||
|
||||
@ -16,9 +16,7 @@ class TransportUpgrader:
|
||||
security_multistream: SecurityMultistream
|
||||
muxer: Sequence[str]
|
||||
|
||||
def __init__(
|
||||
self, secOpt: Dict[TProtocol, ISecureTransport], muxerOpt: Sequence[str]
|
||||
) -> None:
|
||||
def __init__(self, secOpt: Dict[TProtocol, ISecureTransport], muxerOpt: Sequence[str]) -> None:
|
||||
# Store security option
|
||||
self.security_multistream = SecurityMultistream()
|
||||
for key in secOpt:
|
||||
@ -46,9 +44,7 @@ class TransportUpgrader:
|
||||
|
||||
@staticmethod
|
||||
def upgrade_connection(
|
||||
conn: IRawConnection,
|
||||
generic_protocol_handler: GenericProtocolHandlerFn,
|
||||
peer_id: ID,
|
||||
conn: IRawConnection, generic_protocol_handler: GenericProtocolHandlerFn, peer_id: ID
|
||||
) -> Mplex:
|
||||
"""
|
||||
Upgrade raw connection to muxed connection
|
||||
|
||||
Reference in New Issue
Block a user