run isort

This commit is contained in:
Chih Cheng Liang 2019-08-05 11:22:44 +08:00
parent 7a04ebb51f
commit e763f57930
No known key found for this signature in database
GPG Key ID: C86B5E6612B1487A
11 changed files with 23 additions and 22 deletions

View File

@ -1,5 +1,5 @@
import asyncio
from abc import ABC, abstractmethod
import asyncio
class IRawConnection(ABC):

View File

@ -1,4 +1,5 @@
from typing import Awaitable, Callable
from libp2p.stream_muxer.abc import IMuxedStream
GenericProtocolHandlerFn = Callable[[IMuxedStream], Awaitable[None]]

View File

@ -1,11 +1,11 @@
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING
from multiaddr import Multiaddr
from libp2p.peer.id import ID
from libp2p.security.secure_conn_interface import ISecureConn
from libp2p.stream_muxer.mplex.constants import HeaderTags
from multiaddr import Multiaddr
from typing import TYPE_CHECKING
if TYPE_CHECKING:
# Prevent GenericProtocolHandlerFn introducing circular dependencies

View File

@ -1,16 +1,17 @@
import asyncio
from typing import Tuple, Dict
from typing import Dict, Tuple
from multiaddr import Multiaddr
from libp2p.security.secure_conn_interface import ISecureConn
from libp2p.network.connection.raw_connection_interface import IRawConnection
from libp2p.network.typing import GenericProtocolHandlerFn
from libp2p.peer.id import ID
from libp2p.security.secure_conn_interface import ISecureConn
from libp2p.stream_muxer.abc import IMuxedConn, IMuxedStream
from .constants import HeaderTags
from .utils import encode_uvarint, decode_uvarint_from_stream
from .mplex_stream import MplexStream
from .utils import decode_uvarint_from_stream, encode_uvarint
class Mplex(IMuxedConn):

View File

@ -1,6 +1,6 @@
import asyncio
from libp2p.stream_muxer.abc import IMuxedStream, IMuxedConn
from libp2p.stream_muxer.abc import IMuxedConn, IMuxedStream
from .constants import HeaderTags

View File

@ -1,6 +1,5 @@
import asyncio
import struct
from typing import Tuple

View File

@ -1,6 +1,6 @@
from abc import ABC, abstractmethod
from typing import List
from multiaddr import Multiaddr

View File

@ -1,16 +1,15 @@
import asyncio
from socket import socket
from typing import List
from typing import List, Callable
from multiaddr import Multiaddr
from socket import socket
from libp2p.peer.id import ID
from libp2p.transport.typing import THandler
from libp2p.network.connection.raw_connection_interface import IRawConnection
from libp2p.network.connection.raw_connection import RawConnection
from libp2p.network.connection.raw_connection_interface import IRawConnection
from libp2p.peer.id import ID
from libp2p.transport.listener_interface import IListener
from libp2p.transport.transport_interface import ITransport
from libp2p.transport.typing import THandler
class TCPListener(IListener):

View File

@ -1,8 +1,10 @@
from abc import ABC, abstractmethod
from multiaddr import Multiaddr
from libp2p.peer.id import ID
from libp2p.network.connection.raw_connection_interface import IRawConnection
from libp2p.peer.id import ID
from .listener_interface import IListener
from .typing import THandler

View File

@ -1,5 +1,4 @@
from asyncio import StreamReader, StreamWriter
from typing import NewType, Callable
from typing import Callable
THandler = Callable[[StreamReader, StreamWriter], None]

View File

@ -1,15 +1,15 @@
from typing import Dict, Sequence
from libp2p.stream_muxer.mplex.mplex import Mplex
from libp2p.security.security_multistream import SecurityMultistream, TProtocol
from libp2p.network.connection.raw_connection_interface import IRawConnection
from libp2p.network.typing import GenericProtocolHandlerFn
from libp2p.peer.id import ID
from libp2p.security.secure_conn_interface import ISecureConn
from libp2p.security.secure_transport_interface import ISecureTransport
from libp2p.security.security_multistream import SecurityMultistream, TProtocol
from libp2p.stream_muxer.mplex.mplex import Mplex
from .transport_interface import ITransport
from .listener_interface import IListener
from .transport_interface import ITransport
class TransportUpgrader: