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:
@@ -342,7 +342,7 @@ PyDoc_STRVAR(
|
||||
" :arg name: The name of the attribute.\n"
|
||||
" :type name: str\n"
|
||||
" :arg value: The attribute value.\n"
|
||||
" :type value: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n");
|
||||
" :type value: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n");
|
||||
|
||||
static PyObject *StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self,
|
||||
PyObject *args,
|
||||
@@ -376,8 +376,8 @@ PyDoc_STRVAR(
|
||||
"\n"
|
||||
" :arg name: The name of the attribute.\n"
|
||||
" :type name: str\n"
|
||||
" :arg value: The attribute value.\n"
|
||||
" :type value: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n");
|
||||
" :arg value: The attribute value as a 3D vector.\n"
|
||||
" :type value: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n");
|
||||
|
||||
static PyObject *StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self,
|
||||
PyObject *args,
|
||||
|
||||
Reference in New Issue
Block a user