Pydoc: Fix sphinx compile warnings about freestyle

Sphinx expects functions and methods with the same name and different
parameters to be written using one directive. See:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#basic-markup

Unfortunately this makes giving different descriptions for each harder.
This was already a request for better support for this in sphinx, see:
https://github.com/sphinx-doc/sphinx/issues/7787

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D9170
This commit is contained in:
Aaron Carlisle
2020-10-22 17:20:57 -04:00
committed by Aaron Carlisle
parent 956af16189
commit baa24f1c91
35 changed files with 305 additions and 540 deletions

View File

@@ -50,20 +50,18 @@ int SShape_Init(PyObject *module)
/*----------------------SShape methods ----------------------------*/
PyDoc_STRVAR(SShape_doc,
"Class to define a feature shape. It is the gathering of feature\n"
"elements from an identified input shape.\n"
"\n"
".. method:: __init__()\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: An SShape object.\n"
" :type brother: :class:`SShape`");
PyDoc_STRVAR(
SShape_doc,
"Class to define a feature shape. It is the gathering of feature\n"
"elements from an identified input shape.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
"\n"
" Creates a :class:`SShape` class using either a default constructor or copy constructor.\n"
"\n"
" :arg brother: An SShape object.\n"
" :type brother: :class:`SShape`");
static int SShape_init(BPy_SShape *self, PyObject *args, PyObject *kwds)
{