PyDoc: use Python's type annotation syntax for doc-strings
Replace plain-text type information with the type syntax used for Python's type annotations as it's more concise, especially for callbacks which often didn't include useful type information. Note that this change only applies to inline doc-strings, generated doc-strings from RNA need to be updated separately. Details: - Many minor corrections were made when "list" was incorrectly used instead of "sequence". - Some type information wasn't defined in the doc-strings and has been added. - Verbose type info would benefit from support for type aliases.
This commit is contained in:
@@ -35,9 +35,12 @@ PyDoc_STRVAR(
|
||||
"\n"
|
||||
" Calculate barycentric weights for a point on a polygon.\n"
|
||||
"\n"
|
||||
" :arg veclist: list of vectors\n"
|
||||
" :arg pt: point"
|
||||
" :rtype: list of per-vector weights\n");
|
||||
" :arg veclist: Sequence of 3D positions.\n"
|
||||
" :type veclist: Sequence[Sequence[float]]\n"
|
||||
" :arg pt: 2D or 3D position."
|
||||
" :type pt: Sequence[float]"
|
||||
" :return: list of per-vector weights.\n"
|
||||
" :rtype: list[float]\n");
|
||||
static PyObject *M_Interpolate_poly_3d_calc(PyObject * /*self*/, PyObject *args)
|
||||
{
|
||||
float fp[3];
|
||||
|
||||
Reference in New Issue
Block a user