Remove pylint:disable

This commit is contained in:
mhchia
2019-08-02 23:19:36 +08:00
parent 06a9511ab4
commit 2e94fcf56c
36 changed files with 7 additions and 64 deletions

View File

@ -8,7 +8,6 @@ from .configs import GOSSIPSUB_PARAMS
from .factories import FloodsubFactory, GossipsubFactory, HostFactory, PubsubFactory
# pylint: disable=redefined-outer-name
@pytest.fixture

View File

@ -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.

View File

@ -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):

View File

@ -13,7 +13,6 @@ from .floodsub_integration_test_settings import (
)
# pylint: disable=too-many-locals
@pytest.mark.parametrize("num_hosts", (2,))

View File

@ -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])

View File

@ -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

View File

@ -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],