|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
NumPy-style docstring assembly (numpydoc). More...
#include <welder/rods/python/doc_style.hpp>
Static Public Member Functions | |
| static constexpr std::string | format (const ::welder::detail::function_doc &d) |
| Assemble d into a NumPy-style docstring. | |
NumPy-style docstring assembly (numpydoc).
The summary, then an underlined Parameters section listing each documented parameter (the parameter name on its own line, its doc indented four spaces beneath), then an underlined Returns section (the return doc indented four spaces). welder has no target-language type text to place after the numpydoc name : type colon, so the type is omitted — a form numpydoc accepts (a bare name followed by an indented description). Empty sections are dropped and each section is preceded by a blank line; multiline docs keep their continuation lines under the four-space body indent.
Satisfies welder::doc_style. NumPy docstrings are also parsed by Sphinx's Napoleon extension.
Definition at line 139 of file doc_style.hpp.
|
inlinestaticconstexpr |
Assemble d into a NumPy-style docstring.
| d | the documentation pieces. |
Definition at line 143 of file doc_style.hpp.
References welder::rods::python::detail::any_param_doc(), welder::rods::python::detail::append_indented(), and welder::rods::python::detail::blank_line().