mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
fix linting issues
This commit is contained in:
@ -2,7 +2,6 @@ import multiaddr
|
||||
import pytest
|
||||
|
||||
from tests.utils import cleanup, set_up_nodes_by_transport_opt
|
||||
from libp2p import new_node
|
||||
from libp2p.peer.peerinfo import info_from_p2p_addr
|
||||
|
||||
|
||||
@ -10,7 +9,7 @@ from libp2p.peer.peerinfo import info_from_p2p_addr
|
||||
@pytest.mark.asyncio
|
||||
async def test_simple_messages():
|
||||
transport_opt_list = [["/ip4/127.0.0.1/tcp/0"], ["/ip4/127.0.0.1/tcp/0"]]
|
||||
(node_a, node_b) = await set_up_nodes_by_transport_opt(transport_opt_list)
|
||||
(node_a, node_b) = await set_up_nodes_by_transport_opt(transport_opt_list)
|
||||
|
||||
async def stream_handler(stream):
|
||||
while True:
|
||||
|
||||
@ -10,8 +10,11 @@ features are implemented in swarm
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import multiaddr
|
||||
|
||||
from tests.utils import *
|
||||
|
||||
from tests.utils import cleanup, echo_stream_handler, \
|
||||
perform_two_host_set_up_custom_handler
|
||||
from libp2p import new_node, initialize_default_swarm
|
||||
from libp2p.network.notifee_interface import INotifee
|
||||
from libp2p.host.basic_host import BasicHost
|
||||
@ -39,11 +42,11 @@ class MyNotifee(INotifee):
|
||||
async def disconnected(self, network, conn):
|
||||
pass
|
||||
|
||||
async def listen(self, network, multiaddr):
|
||||
async def listen(self, network, _multiaddr):
|
||||
self.events.append(["listened" + self.val_to_append_to_event,\
|
||||
multiaddr])
|
||||
_multiaddr])
|
||||
|
||||
async def listen_close(self, network, multiaddr):
|
||||
async def listen_close(self, network, _multiaddr):
|
||||
pass
|
||||
|
||||
class InvalidNotifee():
|
||||
|
||||
Reference in New Issue
Block a user