From db0017ddbb64c49b20ae3afb220f810f9333c79d Mon Sep 17 00:00:00 2001 From: NIC619 Date: Thu, 5 Dec 2019 17:33:07 +0800 Subject: [PATCH] Fix lint after applying suggestion --- libp2p/pubsub/gossipsub.py | 4 +--- tests/pubsub/test_gossipsub.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libp2p/pubsub/gossipsub.py b/libp2p/pubsub/gossipsub.py index af5ea771..208d2878 100644 --- a/libp2p/pubsub/gossipsub.py +++ b/libp2p/pubsub/gossipsub.py @@ -129,9 +129,7 @@ class GossipSub(IPubsubRouter): # instance in multistream-select, but it is not the protocol that gossipsub supports. # In this case, probably we registered gossipsub to a wrong `protocol_id` # in multistream-select, or wrong versions. - raise Exception( - f"Unreachable: Protocol={protocol_id} is not supported." - ) + raise Exception(f"Unreachable: Protocol={protocol_id} is not supported.") self.peers_to_protocol[peer_id] = protocol_id def remove_peer(self, peer_id: ID) -> None: diff --git a/tests/pubsub/test_gossipsub.py b/tests/pubsub/test_gossipsub.py index 030dba43..19ec07c5 100644 --- a/tests/pubsub/test_gossipsub.py +++ b/tests/pubsub/test_gossipsub.py @@ -148,7 +148,7 @@ async def test_handle_prune(pubsubs_gsub, hosts): await connect(hosts[index_alice], hosts[index_bob]) - # Wait for heartbeat to allow mesh to connect + # Wait for heartbeat to allow mesh to connect await asyncio.sleep(1) # Check that they are each other's mesh peer