mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Remove pylint:disable
This commit is contained in:
@ -8,7 +8,6 @@ from .configs import GOSSIPSUB_PARAMS
|
||||
from .factories import FloodsubFactory, GossipsubFactory, HostFactory, PubsubFactory
|
||||
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@ -137,14 +137,12 @@ FLOODSUB_PROTOCOL_TEST_CASES = [
|
||||
},
|
||||
]
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
floodsub_protocol_pytest_params = [
|
||||
pytest.param(test_case, id=test_case["name"])
|
||||
for test_case in FLOODSUB_PROTOCOL_TEST_CASES
|
||||
]
|
||||
|
||||
|
||||
# pylint: disable=too-many-locals
|
||||
async def perform_test_from_obj(obj, router_factory):
|
||||
"""
|
||||
Perform pubsub tests from a test obj.
|
||||
|
||||
@ -7,7 +7,6 @@ from tests.utils import cleanup, connect
|
||||
|
||||
from .dummy_account_node import DummyAccountNode
|
||||
|
||||
# pylint: disable=too-many-locals
|
||||
|
||||
|
||||
def create_setup_in_new_thread_func(dummy_node):
|
||||
|
||||
@ -13,7 +13,6 @@ from .floodsub_integration_test_settings import (
|
||||
)
|
||||
|
||||
|
||||
# pylint: disable=too-many-locals
|
||||
|
||||
|
||||
@pytest.mark.parametrize("num_hosts", (2,))
|
||||
|
||||
@ -10,7 +10,6 @@ from .floodsub_integration_test_settings import (
|
||||
)
|
||||
|
||||
|
||||
# pylint: disable=too-many-locals
|
||||
@pytest.mark.asyncio
|
||||
async def test_gossipsub_initialize_with_floodsub_protocol():
|
||||
GossipsubFactory(protocols=[FLOODSUB_PROTOCOL_ID])
|
||||
|
||||
@ -3,10 +3,8 @@ import pytest
|
||||
from libp2p.pubsub.mcache import MessageCache
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class Msg:
|
||||
def __init__(self, topicIDs, seqno, from_id):
|
||||
# pylint: disable=invalid-name
|
||||
self.topicIDs = topicIDs
|
||||
self.seqno = seqno
|
||||
self.from_id = from_id
|
||||
|
||||
@ -75,7 +75,6 @@ async def test_get_hello_packet(pubsubs_fsub):
|
||||
packet.ParseFromString(pubsubs_fsub[0].get_hello_packet())
|
||||
return tuple(sub.topicid for sub in packet.subscriptions)
|
||||
|
||||
# pylint: disable=len-as-condition
|
||||
# Test: No subscription, so there should not be any topic ids in the hello packet.
|
||||
assert len(_get_hello_packet_topic_ids()) == 0
|
||||
|
||||
@ -295,7 +294,6 @@ async def test_publish(pubsubs_fsub, monkeypatch):
|
||||
@pytest.mark.parametrize("num_hosts", (1,))
|
||||
@pytest.mark.asyncio
|
||||
async def test_push_msg(pubsubs_fsub, monkeypatch):
|
||||
# pylint: disable=protected-access
|
||||
msg_0 = make_pubsub_msg(
|
||||
origin_id=pubsubs_fsub[0].my_id,
|
||||
topic_ids=[TESTING_TOPIC],
|
||||
|
||||
Reference in New Issue
Block a user