From 72628ee37d4bdef9e8642d2a832a3decedbfa9dd Mon Sep 17 00:00:00 2001 From: Christian Monch Date: Mon, 6 Nov 2023 13:04:54 +0100 Subject: [PATCH] fix documentation rendering --- datalad_next/runners/__init__.py | 4 ++-- datalad_next/runners/batch.py | 25 +++++++++++-------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/datalad_next/runners/__init__.py b/datalad_next/runners/__init__.py index dbf8aa7b4..4ec9b8ade 100644 --- a/datalad_next/runners/__init__.py +++ b/datalad_next/runners/__init__.py @@ -50,7 +50,7 @@ :toctree: generated run - + batch A standard exception type is used to communicate any process termination with a non-zero exit code (unless the keyword argument ``exception_on_error`` is @@ -83,7 +83,7 @@ NoCaptureGeneratorProtocol StdOutCaptureGeneratorProtocol - + StdOutLineCaptureGeneratorProtocol Low-level tooling ----------------- diff --git a/datalad_next/runners/batch.py b/datalad_next/runners/batch.py index dca9a9501..f13bfb585 100644 --- a/datalad_next/runners/batch.py +++ b/datalad_next/runners/batch.py @@ -8,10 +8,9 @@ .. autosummary:: :toctree: generated - StdOutCaptureGeneratorProtocol - StdOutLineCaptureGeneratorProtocol GeneratorAnnexJsonProtocol _ResultGenerator + """ from __future__ import annotations @@ -120,13 +119,13 @@ def batchcommand( A list containing the command and its arguments (argv-like). cwd : Path | None If not ``None``, determines a new working directory for the command. - terminate_time: int | None + terminate_time : int | None The number of timeouts after which a terminate-signal will be sent to the process, if it is still running. If no timeouts were provided in the ``timeout``-argument, the timeout is set to ``1.0``. - kill_time: int | None + kill_time : int | None See documentation of :func:`datalad_next.runners.run.run`. - protocol_kwargs: dict + protocol_kwargs : dict If ``terminate_time`` is given, a kill-signal will be sent to the subprocess after kill-signal after ``terminate_time + kill_time`` timeouts. If ``terminate_time`` is not set, a kill-signal will be sent @@ -211,25 +210,23 @@ def stdoutline_batchcommand( response to an input. Internally this calls :func:`batchcommand` with the - :class:`StdOutLineCaptureGeneratorProtocol` protocol implementation. See the + :class:`StdOutLineCaptureGeneratorProtocol` protocol implementation. See + the documentation of :func:`batchcommand` for a description of the + remaining parameters. Parameters ---------- separator : str | None (default ``None``) If ``None``, lines are separated by the built-in separators of python. If not ``None``, lines are separated by the given character. - The``separator`` keyword argument will override a ``separator`` keyword + The ``separator`` keyword argument will override a ``separator`` keyword argument provided in the ``protocol_kwargs``. - - keep_ends: bool (default: ``False``) + keep_ends : bool (default ``False``) If ``False``, the returned lines will not contain the terminating character. If ``True``, the returned lines will contain the terminating - character. - The``keep_ends`` keyword argument will override a ``keep_ends`` keyword - argument provided in the ``protocol_kwargs``. + character. The ``keep_ends`` keyword argument will override a + ``keep_ends`` keyword argument provided in the ``protocol_kwargs``. - See the documentation of :func:`batchcommand` for a description of the - remaining parameters. """ return batchcommand( cmd,