From 933fb1978f4195cf3043e5a3ccc1fc5e5655e7b3 Mon Sep 17 00:00:00 2001 From: nutti Date: Wed, 9 Oct 2024 14:29:58 +1100 Subject: [PATCH] PyAPI: correct types in doc-strings Ref !116245 --- source/blender/freestyle/intern/python/BPy_Operators.cpp | 2 +- source/blender/freestyle/intern/python/BPy_SShape.cpp | 4 ++-- source/blender/freestyle/intern/python/BPy_ViewShape.cpp | 4 ++-- .../freestyle/intern/python/Interface0D/BPy_SVertex.cpp | 2 +- .../BPy_GetOccludersF0D.cpp | 4 ++-- .../BPy_GetOccludeeF1D.cpp | 2 +- .../BPy_GetOccludersF1D.cpp | 2 +- .../UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp | 2 +- source/blender/python/bmesh/bmesh_py_types.cc | 2 +- source/blender/python/bmesh/bmesh_py_utils.cc | 2 +- source/blender/python/gpu/gpu_py_compute.cc | 2 +- source/blender/python/gpu/gpu_py_shader.cc | 8 ++++---- source/blender/python/intern/bpy_rna.cc | 8 ++++---- source/blender/python/mathutils/mathutils_Vector.cc | 2 +- source/blender/python/mathutils/mathutils_geometry.cc | 4 ++-- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 7bca91cd75a..791a3fbb4f6 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -527,7 +527,7 @@ PyDoc_STRVAR( " transform as a stroke.\n" " :type pred: :class:`UnaryPredicate1D`\n" " :arg shaders: The list of shaders used to shade the strokes.\n" - " :type shaders: list of :class:`StrokeShader` objects"); + " :type shaders: list of :class:`StrokeShader`"); static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index a369081ffd7..ffb01bf6cb1 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -232,7 +232,7 @@ PyDoc_STRVAR( SShape_vertices_doc, "The list of vertices constituting this SShape.\n" "\n" - ":type: List of :class:`SVertex` objects"); + ":type: List of :class:`SVertex`"); static PyObject *SShape_vertices_get(BPy_SShape *self, void * /*closure*/) { @@ -254,7 +254,7 @@ PyDoc_STRVAR( SShape_edges_doc, "The list of edges constituting this SShape.\n" "\n" - ":type: List of :class:`FEdge` objects"); + ":type: List of :class:`FEdge`"); static PyObject *SShape_edges_get(BPy_SShape *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index 5af10e87acd..b0f463e0dd9 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -207,7 +207,7 @@ PyDoc_STRVAR( ViewShape_vertices_doc, "The list of ViewVertex objects contained in this ViewShape.\n" "\n" - ":type: List of :class:`ViewVertex` objects"); + ":type: List of :class:`ViewVertex`"); static PyObject *ViewShape_vertices_get(BPy_ViewShape *self, void * /*closure*/) { @@ -252,7 +252,7 @@ PyDoc_STRVAR( ViewShape_edges_doc, "The list of ViewEdge objects contained in this ViewShape.\n" "\n" - ":type: List of :class:`ViewEdge` objects"); + ":type: List of :class:`ViewEdge`"); static PyObject *ViewShape_edges_get(BPy_ViewShape *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index 6ce43e2e6be..fbc8d9dacf9 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -353,7 +353,7 @@ PyDoc_STRVAR( "has exactly one normal. In a smooth surface, an SVertex can have any\n" "number of normals.\n" "\n" - ":type: list of :class:`mathutils.Vector` objects"); + ":type: list of :class:`mathutils.Vector`"); static PyObject *SVertex_normals_get(BPy_SVertex *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp index b1793b45f2a..d1b2f012967 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp @@ -32,14 +32,14 @@ PyDoc_STRVAR( "\n" ".. method:: __call__(it)\n" "\n" - " Returns a list of :class:`freestyle.types.ViewShape` objects occluding the\n" + " Returns a list of :class:`freestyle.types.ViewShape` occluding the\n" " :class:`freestyle.types.Interface0D` pointed by the Interface0DIterator.\n" "\n" " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: A list of ViewShape objects occluding the pointed\n" " Interface0D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); + " :rtype: list of :class:`freestyle.types.ViewShape`\n"); static int GetOccludersF0D___init__(BPy_GetOccludersF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp index 2d26edcf229..f4c93e01b5e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp @@ -39,7 +39,7 @@ PyDoc_STRVAR( " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: A list of occluded shapes covered by the Interface1D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); + " :rtype: list of :class:`freestyle.types.ViewShape`\n"); static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp index 35e8b70f69f..2fbbc38c12b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp @@ -39,7 +39,7 @@ PyDoc_STRVAR( " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: A list of occluding shapes that cover the Interface1D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); + " :rtype: list of :class:`freestyle.types.ViewShape`\n"); static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp index fd118b7db99..7a7112a57aa 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp @@ -39,7 +39,7 @@ PyDoc_STRVAR( " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: A list of shapes covered by the Interface1D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); + " :rtype: list of :class:`freestyle.types.ViewShape`\n"); static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/python/bmesh/bmesh_py_types.cc b/source/blender/python/bmesh/bmesh_py_types.cc index e81dfcce8fa..77a3bc1959c 100644 --- a/source/blender/python/bmesh/bmesh_py_types.cc +++ b/source/blender/python/bmesh/bmesh_py_types.cc @@ -2918,7 +2918,7 @@ PyDoc_STRVAR( " :arg key: The key that sets the ordering of the elements.\n" " :type key: :function: returning a number\n" " :arg reverse: Reverse the order of the elements\n" - " :type reverse: :boolean:\n" + " :type reverse: bool\n" "\n" " .. note::\n" "\n" diff --git a/source/blender/python/bmesh/bmesh_py_utils.cc b/source/blender/python/bmesh/bmesh_py_utils.cc index b81b3660896..1eaf5e3cf9e 100644 --- a/source/blender/python/bmesh/bmesh_py_utils.cc +++ b/source/blender/python/bmesh/bmesh_py_utils.cc @@ -546,7 +546,7 @@ PyDoc_STRVAR( " :arg edgenet: Sequence of edges.\n" " :type edgenet: :class:`bmesh.types.BMEdge`\n" " :return: The newly created faces.\n" - " :rtype: tuple of (:class:`bmesh.types.BMFace`)\n" + " :rtype: tuple of :class:`bmesh.types.BMFace`\n" "\n" " .. note::\n" "\n" diff --git a/source/blender/python/gpu/gpu_py_compute.cc b/source/blender/python/gpu/gpu_py_compute.cc index 2e3b19ec36d..8f844614cc1 100644 --- a/source/blender/python/gpu/gpu_py_compute.cc +++ b/source/blender/python/gpu/gpu_py_compute.cc @@ -39,7 +39,7 @@ PyDoc_STRVAR( " :arg groups_z_len: Int for group z length:\n" " :type groups_z_len: int\n" " :return: Shader object.\n" - " :rtype: :class:`bpy.types.GPUShader`\n"); + " :rtype: :class:`gpu.types.GPUShader`\n"); static PyObject *pygpu_compute_dispatch(PyObject * /*self*/, PyObject *args, PyObject *kwds) { BPYGPU_IS_INIT_OR_ERROR_OBJ; diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index 08f2e4e9ac4..bf21a971f2a 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -406,7 +406,7 @@ PyDoc_STRVAR( " :arg name: Name of the uniform variable whose value is to be changed.\n" " :type name: str\n" " :arg value: Value that will be used to update the specified uniform variable.\n" - " :type value: single number or sequence of numbers\n"); + " :type value: single number or sequence of floats\n"); static PyObject *pygpu_shader_uniform_float(BPyGPUShader *self, PyObject *args) { const char *error_prefix = "GPUShader.uniform_float"; @@ -478,7 +478,7 @@ PyDoc_STRVAR( " :arg name: name of the uniform variable whose value is to be changed.\n" " :type name: str\n" " :arg seq: Value that will be used to update the specified uniform variable.\n" - " :type seq: sequence of numbers\n"); + " :type seq: sequence of ints\n"); static PyObject *pygpu_shader_uniform_int(BPyGPUShader *self, PyObject *args) { const char *error_prefix = "GPUShader.uniform_int"; @@ -947,7 +947,7 @@ PyDoc_STRVAR( " - ``CLIPPED``\n" " :type config: str\n" " :return: Shader object corresponding to the given name.\n" - " :rtype: :class:`bpy.types.GPUShader`\n"); + " :rtype: :class:`gpu.types.GPUShader`\n"); static PyObject *pygpu_shader_from_builtin(PyObject * /*self*/, PyObject *args, PyObject *kwds) { BPYGPU_IS_INIT_OR_ERROR_OBJ; @@ -993,7 +993,7 @@ PyDoc_STRVAR( " :arg shader_info: GPUShaderCreateInfo\n" " :type shader_info: :class:`bpy.types.GPUShaderCreateInfo`\n" " :return: Shader object corresponding to the given name.\n" - " :rtype: :class:`bpy.types.GPUShader`\n"); + " :rtype: :class:`gpu.types.GPUShader`\n"); static PyObject *pygpu_shader_create_from_info(BPyGPUShader * /*self*/, BPyGPUShaderCreateInfo *o) { BPYGPU_IS_INIT_OR_ERROR_OBJ; diff --git a/source/blender/python/intern/bpy_rna.cc b/source/blender/python/intern/bpy_rna.cc index 3e3c8803bfc..a0cef7bde44 100644 --- a/source/blender/python/intern/bpy_rna.cc +++ b/source/blender/python/intern/bpy_rna.cc @@ -3565,7 +3565,7 @@ PyDoc_STRVAR( " dictionary function of the same name).\n" "\n" " :return: custom property keys.\n" - " :rtype: :class:`idprop.type.IDPropertyGroupViewKeys`\n" + " :rtype: :class:`idprop.types.IDPropertyGroupViewKeys`\n" "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_keys(BPy_StructRNA *self) { @@ -3590,7 +3590,7 @@ PyDoc_STRVAR( " dictionary function of the same name).\n" "\n" " :return: custom property key, value pairs.\n" - " :rtype: :class:`idprop.type.IDPropertyGroupViewItems`\n" + " :rtype: :class:`idprop.types.IDPropertyGroupViewItems`\n" "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_items(BPy_StructRNA *self) { @@ -3615,7 +3615,7 @@ PyDoc_STRVAR( " dictionary function of the same name).\n" "\n" " :return: custom property values.\n" - " :rtype: :class:`idprop.type.IDPropertyGroupViewValues`\n" + " :rtype: :class:`idprop.types.IDPropertyGroupViewValues`\n" "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_values(BPy_StructRNA *self) { @@ -4299,7 +4299,7 @@ PyDoc_STRVAR( ".. method:: id_properties_ensure()\n" "\n" " :return: the parent group for an RNA struct's custom IDProperties.\n" - " :rtype: :class:`bpy.types.IDPropertyGroup`\n"); + " :rtype: :class:`idprop.types.IDPropertyGroup`\n"); static PyObject *pyrna_struct_id_properties_ensure(BPy_StructRNA *self) { PYRNA_STRUCT_CHECK_OBJ(self); diff --git a/source/blender/python/mathutils/mathutils_Vector.cc b/source/blender/python/mathutils/mathutils_Vector.cc index 3ddeaaed944..dc1a3a948bb 100644 --- a/source/blender/python/mathutils/mathutils_Vector.cc +++ b/source/blender/python/mathutils/mathutils_Vector.cc @@ -3406,7 +3406,7 @@ PyDoc_STRVAR( " This object gives access to Vectors in Blender.\n" "\n" " :arg seq: Components of the vector, must be a sequence of at least two\n" - " :type seq: sequence of numbers\n"); + " :type seq: sequence of floats\n"); PyTypeObject vector_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "Vector", diff --git a/source/blender/python/mathutils/mathutils_geometry.cc b/source/blender/python/mathutils/mathutils_geometry.cc index c5ddb069460..02d4e7c9306 100644 --- a/source/blender/python/mathutils/mathutils_geometry.cc +++ b/source/blender/python/mathutils/mathutils_geometry.cc @@ -640,7 +640,7 @@ PyDoc_STRVAR( " :arg sphere_co: The center of the sphere\n" " :type sphere_co: :class:`mathutils.Vector`\n" " :arg sphere_radius: Radius of the sphere\n" - " :type sphere_radius: sphere_radius\n" + " :type sphere_radius: float\n" " :return: The intersection points as a pair of vectors or None when there is no " "intersection\n" " :rtype: A tuple pair containing :class:`mathutils.Vector` or None\n"); @@ -731,7 +731,7 @@ PyDoc_STRVAR( " :arg sphere_co: The center of the sphere\n" " :type sphere_co: :class:`mathutils.Vector`\n" " :arg sphere_radius: Radius of the sphere\n" - " :type sphere_radius: sphere_radius\n" + " :type sphere_radius: float\n" " :return: The intersection points as a pair of vectors or None when there is no " "intersection\n" " :rtype: A tuple pair containing :class:`mathutils.Vector` or None\n");