mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 08:00:54 +00:00
Fix: use pass over ...(Ellipse)
Use `...`(Ellipse) only in abstract methods.
This commit is contained in:
@ -74,4 +74,4 @@ class INetwork(ABC):
|
|||||||
|
|
||||||
|
|
||||||
class INetworkService(INetwork, ServiceAPI):
|
class INetworkService(INetwork, ServiceAPI):
|
||||||
...
|
pass
|
||||||
|
|||||||
@ -2,8 +2,8 @@ from libp2p.exceptions import BaseLibp2pError
|
|||||||
|
|
||||||
|
|
||||||
class PubsubRouterError(BaseLibp2pError):
|
class PubsubRouterError(BaseLibp2pError):
|
||||||
...
|
pass
|
||||||
|
|
||||||
|
|
||||||
class NoPubsubAttached(PubsubRouterError):
|
class NoPubsubAttached(PubsubRouterError):
|
||||||
...
|
pass
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class PubsubNotifee(INotifee):
|
|||||||
await self.initiator_peers_queue.send(conn.muxed_conn.peer_id)
|
await self.initiator_peers_queue.send(conn.muxed_conn.peer_id)
|
||||||
except trio.BrokenResourceError:
|
except trio.BrokenResourceError:
|
||||||
# The receive channel is closed by Pubsub. We should do nothing here.
|
# The receive channel is closed by Pubsub. We should do nothing here.
|
||||||
...
|
pass
|
||||||
|
|
||||||
async def disconnected(self, network: INetwork, conn: INetConn) -> None:
|
async def disconnected(self, network: INetwork, conn: INetConn) -> None:
|
||||||
"""
|
"""
|
||||||
@ -64,7 +64,7 @@ class PubsubNotifee(INotifee):
|
|||||||
await self.dead_peers_queue.send(conn.muxed_conn.peer_id)
|
await self.dead_peers_queue.send(conn.muxed_conn.peer_id)
|
||||||
except trio.BrokenResourceError:
|
except trio.BrokenResourceError:
|
||||||
# The receive channel is closed by Pubsub. We should do nothing here.
|
# The receive channel is closed by Pubsub. We should do nothing here.
|
||||||
...
|
pass
|
||||||
|
|
||||||
async def listen(self, network: INetwork, multiaddr: Multiaddr) -> None:
|
async def listen(self, network: INetwork, multiaddr: Multiaddr) -> None:
|
||||||
await trio.hazmat.checkpoint()
|
await trio.hazmat.checkpoint()
|
||||||
|
|||||||
@ -13,7 +13,7 @@ async def test_tcp_listener(nursery):
|
|||||||
transport = TCP()
|
transport = TCP()
|
||||||
|
|
||||||
async def handler(tcp_stream):
|
async def handler(tcp_stream):
|
||||||
...
|
pass
|
||||||
|
|
||||||
listener = transport.create_listener(handler)
|
listener = transport.create_listener(handler)
|
||||||
assert len(listener.get_addrs()) == 0
|
assert len(listener.get_addrs()) == 0
|
||||||
|
|||||||
Reference in New Issue
Block a user