mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
lint: resolved lint issues
This commit is contained in:
@ -104,9 +104,11 @@ async def main() -> None:
|
|||||||
logger.error(f"Error during identify push: {str(e)}")
|
logger.error(f"Error during identify push: {str(e)}")
|
||||||
print(f"\nError during identify push: {str(e)}")
|
print(f"\nError during identify push: {str(e)}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
trio.run(main)
|
trio.run(main)
|
||||||
|
|
||||||
|
|
||||||
def run_main():
|
def run_main():
|
||||||
"""Non-async entry point for the console script."""
|
"""Non-async entry point for the console script."""
|
||||||
trio.run(main)
|
trio.run(main)
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import multiaddr
|
||||||
import trio
|
import trio
|
||||||
|
|
||||||
|
from libp2p import (
|
||||||
|
new_host,
|
||||||
|
)
|
||||||
|
from libp2p.crypto.secp256k1 import (
|
||||||
|
create_new_key_pair,
|
||||||
|
)
|
||||||
from libp2p.identity.identify.identify import (
|
from libp2p.identity.identify.identify import (
|
||||||
_mk_identify_protobuf,
|
_mk_identify_protobuf,
|
||||||
)
|
)
|
||||||
@ -16,21 +23,12 @@ from libp2p.identity.identify_push.identify_push import (
|
|||||||
push_identify_to_peer,
|
push_identify_to_peer,
|
||||||
push_identify_to_peers,
|
push_identify_to_peers,
|
||||||
)
|
)
|
||||||
from tests.utils.factories import (
|
|
||||||
host_pair_factory,
|
|
||||||
)
|
|
||||||
|
|
||||||
import multiaddr
|
|
||||||
|
|
||||||
from libp2p import (
|
|
||||||
new_host,
|
|
||||||
)
|
|
||||||
from libp2p.crypto.secp256k1 import (
|
|
||||||
create_new_key_pair,
|
|
||||||
)
|
|
||||||
from libp2p.peer.peerinfo import (
|
from libp2p.peer.peerinfo import (
|
||||||
info_from_p2p_addr,
|
info_from_p2p_addr,
|
||||||
)
|
)
|
||||||
|
from tests.utils.factories import (
|
||||||
|
host_pair_factory,
|
||||||
|
)
|
||||||
|
|
||||||
logger = logging.getLogger("libp2p.identity.identify-push-test")
|
logger = logging.getLogger("libp2p.identity.identify-push-test")
|
||||||
|
|
||||||
@ -172,7 +170,6 @@ async def test_identify_push_to_peers(security_protocol):
|
|||||||
# Create a third host
|
# Create a third host
|
||||||
# Instead of using key_pair, create a new host directly
|
# Instead of using key_pair, create a new host directly
|
||||||
|
|
||||||
|
|
||||||
# Create a new key pair for host_c
|
# Create a new key pair for host_c
|
||||||
key_pair_c = create_new_key_pair()
|
key_pair_c = create_new_key_pair()
|
||||||
host_c = new_host(key_pair=key_pair_c)
|
host_c = new_host(key_pair=key_pair_c)
|
||||||
|
|||||||
Reference in New Issue
Block a user