mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Run black over repo
This commit is contained in:
@ -1,14 +1,5 @@
|
||||
from abc import (
|
||||
ABC,
|
||||
abstractmethod,
|
||||
)
|
||||
from typing import (
|
||||
Awaitable,
|
||||
Callable,
|
||||
Dict,
|
||||
Sequence,
|
||||
TYPE_CHECKING,
|
||||
)
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Awaitable, Callable, Dict, Sequence, TYPE_CHECKING
|
||||
|
||||
from multiaddr import Multiaddr
|
||||
|
||||
@ -49,7 +40,9 @@ class INetwork(ABC):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def set_stream_handler(self, protocol_id: str, stream_handler: StreamHandlerFn) -> bool:
|
||||
def set_stream_handler(
|
||||
self, protocol_id: str, stream_handler: StreamHandlerFn
|
||||
) -> bool:
|
||||
"""
|
||||
:param protocol_id: protocol id used on stream
|
||||
:param stream_handler: a stream handler instance
|
||||
@ -57,9 +50,7 @@ class INetwork(ABC):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
async def new_stream(self,
|
||||
peer_id: ID,
|
||||
protocol_ids: Sequence[str]) -> INetStream:
|
||||
async def new_stream(self, peer_id: ID, protocol_ids: Sequence[str]) -> INetStream:
|
||||
"""
|
||||
:param peer_id: peer_id of destination
|
||||
:param protocol_ids: available protocol ids to use for stream
|
||||
@ -74,7 +65,7 @@ class INetwork(ABC):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def notify(self, notifee: 'INotifee') -> bool:
|
||||
def notify(self, notifee: "INotifee") -> bool:
|
||||
"""
|
||||
:param notifee: object implementing Notifee interface
|
||||
:return: true if notifee registered successfully, false otherwise
|
||||
|
||||
Reference in New Issue
Block a user