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:
@@ -144,7 +144,7 @@ PyDoc_STRVAR(
|
||||
" Returns a noise value for a 2D element.\n"
|
||||
"\n"
|
||||
" :arg v: Two-dimensional sample point.\n"
|
||||
" :type v: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n"
|
||||
" :type v: :class:`mathutils.Vector` | tuple[float, float] | list[float]\n"
|
||||
" :arg freq: Noise frequency.\n"
|
||||
" :type freq: float\n"
|
||||
" :arg amp: Amplitude.\n"
|
||||
@@ -182,7 +182,7 @@ PyDoc_STRVAR(
|
||||
" Returns a noise value for a 3D element.\n"
|
||||
"\n"
|
||||
" :arg v: Three-dimensional sample point.\n"
|
||||
" :type v: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n"
|
||||
" :type v: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n"
|
||||
" :arg freq: Noise frequency.\n"
|
||||
" :type freq: float\n"
|
||||
" :arg amp: Amplitude.\n"
|
||||
@@ -243,7 +243,7 @@ PyDoc_STRVAR(
|
||||
" Returns a smooth noise value for a 2D element.\n"
|
||||
"\n"
|
||||
" :arg v: Two-dimensional sample point.\n"
|
||||
" :type v: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n"
|
||||
" :type v: :class:`mathutils.Vector` | tuple[float, float] | list[float]\n"
|
||||
" :return: A smooth noise value.\n"
|
||||
" :rtype: float");
|
||||
|
||||
@@ -273,7 +273,7 @@ PyDoc_STRVAR(
|
||||
" Returns a smooth noise value for a 3D element.\n"
|
||||
"\n"
|
||||
" :arg v: Three-dimensional sample point.\n"
|
||||
" :type v: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n"
|
||||
" :type v: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n"
|
||||
" :return: A smooth noise value.\n"
|
||||
" :rtype: float");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user