mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
run lint and fix errors, except mypy
This commit is contained in:
@ -1,7 +1,15 @@
|
||||
from libp2p import new_swarm
|
||||
from libp2p.crypto.rsa import create_new_key_pair
|
||||
from libp2p.host.basic_host import BasicHost
|
||||
from libp2p.host.defaults import get_default_protocols
|
||||
from libp2p import (
|
||||
new_swarm,
|
||||
)
|
||||
from libp2p.crypto.rsa import (
|
||||
create_new_key_pair,
|
||||
)
|
||||
from libp2p.host.basic_host import (
|
||||
BasicHost,
|
||||
)
|
||||
from libp2p.host.defaults import (
|
||||
get_default_protocols,
|
||||
)
|
||||
|
||||
|
||||
def test_default_protocols():
|
||||
@ -11,6 +19,6 @@ def test_default_protocols():
|
||||
|
||||
mux = host.get_mux()
|
||||
handlers = mux.handlers
|
||||
# NOTE: comparing keys for equality as handlers may be closures that do not compare in the way
|
||||
# this test is concerned with
|
||||
# NOTE: comparing keys for equality as handlers may be closures that do not compare
|
||||
# in the way this test is concerned with
|
||||
assert handlers.keys() == get_default_protocols(host).keys()
|
||||
|
||||
@ -3,8 +3,13 @@ import secrets
|
||||
import pytest
|
||||
import trio
|
||||
|
||||
from libp2p.host.ping import ID, PING_LENGTH
|
||||
from libp2p.tools.factories import host_pair_factory
|
||||
from libp2p.host.ping import (
|
||||
ID,
|
||||
PING_LENGTH,
|
||||
)
|
||||
from libp2p.tools.factories import (
|
||||
host_pair_factory,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.trio
|
||||
|
||||
@ -1,8 +1,15 @@
|
||||
import pytest
|
||||
|
||||
from libp2p.host.exceptions import ConnectionFailure
|
||||
from libp2p.peer.peerinfo import PeerInfo
|
||||
from libp2p.tools.factories import HostFactory, RoutedHostFactory
|
||||
from libp2p.host.exceptions import (
|
||||
ConnectionFailure,
|
||||
)
|
||||
from libp2p.peer.peerinfo import (
|
||||
PeerInfo,
|
||||
)
|
||||
from libp2p.tools.factories import (
|
||||
HostFactory,
|
||||
RoutedHostFactory,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.trio
|
||||
|
||||
Reference in New Issue
Block a user