|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
Google-style docstring assembly (the default). 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 Google-style docstring. | |
Google-style docstring assembly (the default).
The summary, then an Args: block listing each documented parameter ( name: text), then a Returns: block. Undocumented parameters are omitted; the Args:/Returns: blocks are dropped entirely when empty, and blocks are separated from preceding content by a blank line. A multiline param/returns doc keeps its continuation lines indented under the block, so docstrings carrying multiline examples stay readable.
This is the style both Python backends default to (their DocStyle template parameter); it satisfies welder::doc_style. Google docstrings are what Sphinx's Napoleon extension parses out of the box.
Definition at line 92 of file doc_style.hpp.
|
inlinestaticconstexpr |
Assemble d into a Google-style docstring.
| d | the documentation pieces. |
Definition at line 96 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().