|
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. | |
| static constexpr std::string | format_enum (const ::welder::detail::enum_doc &e) |
| Assemble enum e into a NumPy-style docstring: the summary, then an underlined Attributes section listing each documented enumerator (the name on its own line, its doc indented four spaces beneath) — the numpydoc form for class/enum members. | |
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 164 of file doc_style.hpp.
|
inlinestaticconstexpr |
Assemble d into a NumPy-style docstring.
| d | the documentation pieces. |
Definition at line 168 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().
|
inlinestaticconstexpr |
Assemble enum e into a NumPy-style docstring: the summary, then an underlined Attributes section listing each documented enumerator (the name on its own line, its doc indented four spaces beneath) — the numpydoc form for class/enum members.
Empty when the enum carries no documentation at all.
| e | the enum documentation pieces. |
Definition at line 207 of file doc_style.hpp.
References welder::rods::python::detail::append_indented(), and welder::rods::python::detail::blank_line().