From 5063f0e2a6b41d31d15b573aacf672693e3dad9f Mon Sep 17 00:00:00 2001 From: NIC619 Date: Thu, 17 Oct 2019 15:34:11 +0800 Subject: [PATCH] Fix lint --- libp2p/crypto/ed25519.py | 4 ++-- libp2p/io/exceptions.py | 1 + libp2p/security/secio/transport.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libp2p/crypto/ed25519.py b/libp2p/crypto/ed25519.py index 11a1668d..cde26410 100644 --- a/libp2p/crypto/ed25519.py +++ b/libp2p/crypto/ed25519.py @@ -1,12 +1,12 @@ from Crypto.Hash import SHA256 + +from libp2p.crypto.keys import KeyPair, KeyType, PrivateKey, PublicKey from nacl.exceptions import BadSignatureError from nacl.public import PrivateKey as PrivateKeyImpl from nacl.public import PublicKey as PublicKeyImpl from nacl.signing import SigningKey, VerifyKey import nacl.utils as utils -from libp2p.crypto.keys import KeyPair, KeyType, PrivateKey, PublicKey - class Ed25519PublicKey(PublicKey): def __init__(self, impl: PublicKeyImpl) -> None: diff --git a/libp2p/io/exceptions.py b/libp2p/io/exceptions.py index e49ac2df..d4e1dfae 100644 --- a/libp2p/io/exceptions.py +++ b/libp2p/io/exceptions.py @@ -22,5 +22,6 @@ class MissingLengthException(MsgioException): class MissingMessageException(MsgioException): pass + class DecryptionFailedException(MsgioException): pass diff --git a/libp2p/security/secio/transport.py b/libp2p/security/secio/transport.py index f3e3fde9..3667e7b3 100644 --- a/libp2p/security/secio/transport.py +++ b/libp2p/security/secio/transport.py @@ -3,8 +3,8 @@ import io import itertools from typing import Optional, Tuple -import multihash from crypto.authenticated_encryption import InvalidMACException +import multihash from libp2p.crypto.authenticated_encryption import ( EncryptionParameters as AuthenticatedEncryptionParameters,