From fede9311a73916f05fd2880878cc9ac2dc9e75e2 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Mon, 15 Jul 2024 15:44:31 +0200 Subject: [PATCH] Issue #503 docs: avoid bad rst with `openeo_process`on undocumented functions make sure there are enough empty lines between `seealso` and `rtype` from `sphinx_autodoc_typehints` plugin --- openeo/internal/documentation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openeo/internal/documentation.py b/openeo/internal/documentation.py index f2921295e..ec68347ba 100644 --- a/openeo/internal/documentation.py +++ b/openeo/internal/documentation.py @@ -34,8 +34,8 @@ def openeo_process(f: Optional[T] = None, process_id: Optional[str] = None, mode process_id = process_id or f.__name__ url = f"https://processes.openeo.org/#{process_id}" - seealso = f'.. seealso:: openeo.org documentation on `process "{process_id}" <{url}>`_.' - f.__doc__ = textwrap.dedent(f.__doc__ or "") + "\n\n" + seealso + seealso = f'.. seealso::\n openeo.org documentation on `process "{process_id}" <{url}>`_.\n' + f.__doc__ = textwrap.dedent(f.__doc__ or "") + "\n\n" + seealso + "\n\n" _process_registry[process_id].append((f, mode)) return f