Merge pull request #208 from ralexstokes/disable-mypy-ci
disable mypy check during CI temporarily and move `black --check` to Makefile
This commit is contained in:
commit
b2367e35d8
4
Makefile
Normal file
4
Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
lintroll:
|
||||
# NOTE: disabling `mypy` until we get typing sorted in this repo
|
||||
# mypy -p libp2p -p examples --config-file {toxinidir}/mypy.ini
|
||||
black --check examples libp2p/__init__.py libp2p/host libp2p/kademlia libp2p/network libp2p/peer libp2p/protocol_muxer libp2p/pubsub/*.py libp2p/routing libp2p/security libp2p/stream_muxer libp2p/transport tests setup.py
|
@ -1,7 +1,6 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
|
||||
class IRawConnection(ABC):
|
||||
"""
|
||||
A Raw Connection provides a Reader and a Writer
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,2 @@
|
||||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
||||
import grpc
|
||||
|
||||
|
@ -5,7 +5,6 @@ from libp2p.peer.id import ID
|
||||
from libp2p.peer.peerinfo import PeerInfo
|
||||
|
||||
|
||||
|
||||
class IContentRouting(ABC):
|
||||
@abstractmethod
|
||||
def provide(self, cid: bytes, announce: bool = True) -> None:
|
||||
|
@ -3,7 +3,6 @@ from libp2p.security.security_multistream import SecurityMultistream
|
||||
|
||||
|
||||
class TransportUpgrader:
|
||||
|
||||
def __init__(self, secOpt, muxerOpt):
|
||||
# Store security option
|
||||
self.security_multistream = SecurityMultistream()
|
||||
|
@ -23,9 +23,7 @@ from libp2p.network.notifee_interface import INotifee
|
||||
from libp2p.host.basic_host import BasicHost
|
||||
|
||||
|
||||
|
||||
class MyNotifee(INotifee):
|
||||
|
||||
def __init__(self, events, val_to_append_to_event):
|
||||
self.events = events
|
||||
self.val_to_append_to_event = val_to_append_to_event
|
||||
@ -50,7 +48,6 @@ class MyNotifee(INotifee):
|
||||
|
||||
|
||||
class InvalidNotifee:
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
@ -8,8 +8,6 @@ from .configs import GOSSIPSUB_PARAMS
|
||||
from .factories import FloodsubFactory, GossipsubFactory, HostFactory, PubsubFactory
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def num_hosts():
|
||||
return 3
|
||||
|
@ -8,7 +8,6 @@ from tests.utils import cleanup, connect
|
||||
from .dummy_account_node import DummyAccountNode
|
||||
|
||||
|
||||
|
||||
def create_setup_in_new_thread_func(dummy_node):
|
||||
def setup_in_new_thread():
|
||||
asyncio.ensure_future(dummy_node.setup_crypto_networking())
|
||||
|
@ -13,8 +13,6 @@ from .floodsub_integration_test_settings import (
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.mark.parametrize("num_hosts", (2,))
|
||||
@pytest.mark.asyncio
|
||||
async def test_simple_two_nodes(pubsubs_fsub):
|
||||
|
@ -57,9 +57,7 @@ async def test_join(num_hosts, hosts, gossipsubs, pubsubs_gsub):
|
||||
assert hosts[i].get_id() in gossipsubs[central_node_index].mesh[topic]
|
||||
assert hosts[central_node_index].get_id() in gossipsubs[i].mesh[topic]
|
||||
else:
|
||||
assert (
|
||||
hosts[i].get_id() not in gossipsubs[central_node_index].mesh[topic]
|
||||
)
|
||||
assert hosts[i].get_id() not in gossipsubs[central_node_index].mesh[topic]
|
||||
assert topic not in gossipsubs[i].mesh
|
||||
|
||||
await cleanup()
|
||||
|
@ -1,7 +1,6 @@
|
||||
import pytest
|
||||
|
||||
|
||||
|
||||
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*9", 54)])
|
||||
def test_eval(test_input, expected):
|
||||
assert eval(test_input) == expected
|
||||
|
4
tox.ini
4
tox.ini
@ -18,6 +18,6 @@ basepython =
|
||||
[testenv:lint]
|
||||
basepython = python3
|
||||
extras = dev
|
||||
whitelist_externals = make
|
||||
commands =
|
||||
mypy -p libp2p -p examples --config-file {toxinidir}/mypy.ini
|
||||
black --check examples libp2p/__init__.py libp2p/host libp2p/kademlia libp2p/network libp2p/peer libp2p/protocol_muxer libp2p/pubsub/*.py libp2p/routing libp2p/security libp2p/stream_muxer libp2p/transport tests setup.py
|
||||
make lintroll
|
||||
|
Loading…
x
Reference in New Issue
Block a user