datalad / datalad

Keep code, data, containers under control with git and git-annex

Home Page:http://datalad.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`ThreadedRunner.run` docstring syntax error

mih opened this issue · comments

It seems this documentation was never renderer...

The following patch would enable that:

diff --git a/datalad/runner/nonasyncrunner.py b/datalad/runner/nonasyncrunner.py
index 8340ab1df..9a3977a45 100644
--- a/datalad/runner/nonasyncrunner.py
+++ b/datalad/runner/nonasyncrunner.py
@@ -319,7 +319,7 @@ class ThreadedRunner:
         Generator
             If the protocol is a subclass of `GeneratorMixIn`, a Generator
             will be returned. This allows to use this method in constructs
-            like:
+            like::
 
                 for protocol_output in runner.run():
                     ...
@@ -330,7 +330,7 @@ class ThreadedRunner:
             generator will raise StopIteration(return_code), where
             return_code is the return code of the process. The return code
             of the process will also be stored in the "return_code"-attribute
-            of the runner. So you could write:
+            of the runner. So you could write::
 
                gen = runner.run()
                for file_descriptor, data in gen:

Ping @christian-monch

If by rendering you mean html rendering, then it would would also need to be included in some generated toctree, like so (though in reality probably in its own section), right?

❱ git diff source/modref.rst
diff --git a/docs/source/modref.rst b/docs/source/modref.rst
index 180f7f8f1..e3d39a976 100644
--- a/docs/source/modref.rst
+++ b/docs/source/modref.rst
@@ -110,6 +110,8 @@ Support functionality
    support.extensions
    customremotes.base
    customremotes.archives
+   runner.nonasyncrunner

 Configuration management
 ========================

Ping @christian-monch
Thanks a lot @mih

If by rendering you mean html rendering, then it would would also need to be included in some generated toctree, like so (though in reality probably in its own section), right?

❱ git diff source/modref.rst
diff --git a/docs/source/modref.rst b/docs/source/modref.rst
index 180f7f8f1..e3d39a976 100644
--- a/docs/source/modref.rst
+++ b/docs/source/modref.rst
@@ -110,6 +110,8 @@ Support functionality
    support.extensions
    customremotes.base
    customremotes.archives
+   runner.nonasyncrunner

 Configuration management
 ========================

Thanks a lot @mslw