From d50e1b6872daeba07f5b540d285e0ab510be5bc1 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Fri, 2 Aug 2019 14:49:54 -0700 Subject: [PATCH] Use direct types over indirect types --- libp2p/__init__.py | 2 +- libp2p/security/secure_conn_interface.py | 3 +-- libp2p/security/secure_transport_interface.py | 3 +-- libp2p/security/security_multistream.py | 5 ++--- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libp2p/__init__.py b/libp2p/__init__.py index af72cb8..391897f 100644 --- a/libp2p/__init__.py +++ b/libp2p/__init__.py @@ -12,7 +12,7 @@ from libp2p.peer.peerstore import PeerStore from libp2p.peer.peerstore_interface import IPeerStore from libp2p.routing.interfaces import IPeerRouting from libp2p.routing.kademlia.kademlia_peer_router import KadmeliaPeerRouter -from libp2p.security.insecure_security import InsecureTransport +from libp2p.security.insecure.transport import InsecureTransport from libp2p.security.secure_transport_interface import ISecureTransport from libp2p.transport.tcp.tcp import TCP from libp2p.transport.upgrader import TransportUpgrader diff --git a/libp2p/security/secure_conn_interface.py b/libp2p/security/secure_conn_interface.py index 46bb83c..67d8706 100644 --- a/libp2p/security/secure_conn_interface.py +++ b/libp2p/security/secure_conn_interface.py @@ -1,8 +1,7 @@ from abc import ABC, abstractmethod from libp2p.network.connection.raw_connection_interface import IRawConnection - -from .typing import TSecurityDetails +from libp2p.security.typing import TSecurityDetails """ diff --git a/libp2p/security/secure_transport_interface.py b/libp2p/security/secure_transport_interface.py index bf6dfd3..3b3e625 100644 --- a/libp2p/security/secure_transport_interface.py +++ b/libp2p/security/secure_transport_interface.py @@ -2,8 +2,7 @@ from abc import ABC, abstractmethod from libp2p.network.connection.raw_connection_interface import IRawConnection from libp2p.peer.id import ID - -from .secure_conn_interface import ISecureConn +from libp2p.security.secure_conn_interface import ISecureConn """ diff --git a/libp2p/security/security_multistream.py b/libp2p/security/security_multistream.py index b2fd2bd..5a4cca6 100644 --- a/libp2p/security/security_multistream.py +++ b/libp2p/security/security_multistream.py @@ -5,11 +5,10 @@ from libp2p.network.connection.raw_connection_interface import IRawConnection from libp2p.peer.id import ID from libp2p.protocol_muxer.multiselect import Multiselect from libp2p.protocol_muxer.multiselect_client import MultiselectClient +from libp2p.security.secure_conn_interface import ISecureConn +from libp2p.security.secure_transport_interface import ISecureTransport from libp2p.typing import TProtocol -from .secure_conn_interface import ISecureConn -from .secure_transport_interface import ISecureTransport - """ Represents a secured connection object, which includes a connection and details about the security