From e337488883358a57f0d6e2eac15c93e924cc39b3 Mon Sep 17 00:00:00 2001 From: Alexander Schlarb Date: Sun, 27 May 2018 14:24:50 +0200 Subject: [PATCH] Fix docstring syntax of PubSub functions for Sphinx --- ipfsapi/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipfsapi/client.py b/ipfsapi/client.py index 2566199e..5f2a9ac7 100644 --- a/ipfsapi/client.py +++ b/ipfsapi/client.py @@ -2281,6 +2281,7 @@ def pubsub_peers(self, topic=None, **kwargs): topic will be returned in the data. .. code-block:: python + >>> c.pubsub_peers() {'Strings': [ @@ -2329,6 +2330,7 @@ def pubsub_pub(self, topic, payload, **kwargs): base64 encoded when published. .. code-block:: python + # publishes the message 'message' to the topic 'hello' >>> c.pubsub_pub('hello', 'message') [] @@ -2360,6 +2362,7 @@ def pubsub_sub(self, topic, discover=False, **kwargs): hanging. .. code-block:: python + >>> sub = c.pubsub_sub('testing') >>> with c.pubsub_sub('testing') as sub: # publish a message 'hello' to the topic 'testing'