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,12 @@
|
||||
import pytest
|
||||
|
||||
from libp2p.security.noise.io import MAX_NOISE_MESSAGE_LEN, NoisePacketReadWriter
|
||||
from libp2p.tools.factories import raw_conn_factory
|
||||
from libp2p.security.noise.io import (
|
||||
MAX_NOISE_MESSAGE_LEN,
|
||||
NoisePacketReadWriter,
|
||||
)
|
||||
from libp2p.tools.factories import (
|
||||
raw_conn_factory,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
import pytest
|
||||
|
||||
from libp2p.security.noise.messages import NoiseHandshakePayload
|
||||
from libp2p.tools.factories import noise_conn_factory, noise_handshake_payload_factory
|
||||
from libp2p.security.noise.messages import (
|
||||
NoiseHandshakePayload,
|
||||
)
|
||||
from libp2p.tools.factories import (
|
||||
noise_conn_factory,
|
||||
noise_handshake_payload_factory,
|
||||
)
|
||||
|
||||
DATA_0 = b"data_0"
|
||||
DATA_1 = b"1" * 1000
|
||||
|
||||
@ -1,11 +1,22 @@
|
||||
import pytest
|
||||
import trio
|
||||
|
||||
from libp2p.crypto.secp256k1 import create_new_key_pair
|
||||
from libp2p.peer.id import ID
|
||||
from libp2p.security.secio.transport import NONCE_SIZE, create_secure_session
|
||||
from libp2p.tools.constants import MAX_READ_LEN
|
||||
from libp2p.tools.factories import raw_conn_factory
|
||||
from libp2p.crypto.secp256k1 import (
|
||||
create_new_key_pair,
|
||||
)
|
||||
from libp2p.peer.id import (
|
||||
ID,
|
||||
)
|
||||
from libp2p.security.secio.transport import (
|
||||
NONCE_SIZE,
|
||||
create_secure_session,
|
||||
)
|
||||
from libp2p.tools.constants import (
|
||||
MAX_READ_LEN,
|
||||
)
|
||||
from libp2p.tools.factories import (
|
||||
raw_conn_factory,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.trio
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
import pytest
|
||||
|
||||
from libp2p.crypto.rsa import create_new_key_pair
|
||||
from libp2p.security.insecure.transport import PLAINTEXT_PROTOCOL_ID, InsecureSession
|
||||
from libp2p.crypto.rsa import (
|
||||
create_new_key_pair,
|
||||
)
|
||||
from libp2p.security.insecure.transport import (
|
||||
PLAINTEXT_PROTOCOL_ID,
|
||||
InsecureSession,
|
||||
)
|
||||
from libp2p.security.noise.transport import PROTOCOL_ID as NOISE_PROTOCOL_ID
|
||||
from libp2p.security.secio.transport import ID as SECIO_PROTOCOL_ID
|
||||
from libp2p.security.secure_session import SecureSession
|
||||
from libp2p.tools.factories import host_pair_factory
|
||||
from libp2p.security.secure_session import (
|
||||
SecureSession,
|
||||
)
|
||||
from libp2p.tools.factories import (
|
||||
host_pair_factory,
|
||||
)
|
||||
|
||||
initiator_key_pair = create_new_key_pair()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user