Fix: use pass over ...(Ellipse)

Use `...`(Ellipse) only in abstract methods.
This commit is contained in:
mhchia
2020-02-05 20:36:42 +08:00
parent 1fff6ad6b4
commit ba0fb8a833
4 changed files with 6 additions and 6 deletions

View File

@ -74,4 +74,4 @@ class INetwork(ABC):
class INetworkService(INetwork, ServiceAPI): class INetworkService(INetwork, ServiceAPI):
... pass

View File

@ -2,8 +2,8 @@ from libp2p.exceptions import BaseLibp2pError
class PubsubRouterError(BaseLibp2pError): class PubsubRouterError(BaseLibp2pError):
... pass
class NoPubsubAttached(PubsubRouterError): class NoPubsubAttached(PubsubRouterError):
... pass

View File

@ -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()

View File

@ -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