• Jason Rhinelander's avatar
    Fix extra docstring newlines under `options.disable_function_signatures()` · 10d13048
    Jason Rhinelander authored
    When using pybind::options to disable function signatures, user-defined
    docstrings only get appended if they exist, but newlines were getting
    appended unconditionally, so the docstring could end up with blank lines
    (depending on which overloads, in particular, provided docstrings).
    
    This commit suppresses the empty lines by only adding newlines for
    overloads when needed.
    10d13048
test_docstring_options.cpp 2.23 KB