[Bf-blender-cvs] [a5a86f39212] master: Cleanup: python doc-strings

Campbell Barton noreply at git.blender.org
Tue Nov 13 23:32:54 CET 2018


Commit: a5a86f39212fb16c8310d8eca67ccecc4c6f7dd7
Author: Campbell Barton
Date:   Wed Nov 14 09:04:24 2018 +1100
Branches: master
https://developer.blender.org/rBa5a86f39212fb16c8310d8eca67ccecc4c6f7dd7

Cleanup: python doc-strings

Indentation & trailing space.

===================================================================

M	source/blender/python/bmesh/bmesh_py_api.c
M	source/blender/python/bmesh/bmesh_py_types.c
M	source/blender/python/intern/bpy_app_translations.c
M	source/blender/python/intern/bpy_rna.c
M	source/blender/python/mathutils/mathutils_Quaternion.c
M	source/blender/python/mathutils/mathutils_geometry.c

===================================================================

diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index d7324eabb6c..5819d7ce2bb 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -115,7 +115,7 @@ static PyObject *bpy_bm_from_edit_mesh(PyObject *UNUSED(self), PyObject *value)
 PyDoc_STRVAR(bpy_bm_update_edit_mesh_doc,
 ".. method:: update_edit_mesh(mesh, tessface=True, destructive=True)\n"
 "\n"
-"   Update the mesh after changes to the BMesh in editmode, \n"
+"   Update the mesh after changes to the BMesh in editmode,\n"
 "   optionally recalculating n-gon tessellation.\n"
 "\n"
 "   :arg mesh: The editmode mesh.\n"
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index a53248314df..9cd8eeb0aab 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -3272,10 +3272,10 @@ PyDoc_STRVAR(bpy_bmloop_doc,
 "This is normally accessed from :class:`BMFace.loops` where each face loop represents a corner of the face.\n"
 );
 PyDoc_STRVAR(bpy_bmelemseq_doc,
-"General sequence type used for accessing any sequence of \n"
+"General sequence type used for accessing any sequence of\n"
 ":class:`BMVert`, :class:`BMEdge`, :class:`BMFace`, :class:`BMLoop`.\n"
 "\n"
-"When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces` \n"
+"When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces`\n"
 "there are also functions to create/remomove items.\n"
 );
 PyDoc_STRVAR(bpy_bmiter_doc,
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index ffc54969d8c..2a5efc15b87 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -289,12 +289,12 @@ PyDoc_STRVAR(app_translations_py_messages_register_doc,
 "   Registers an addon's UI translations.\n"
 "\n"
 "   .. note::\n"
-"       Does nothing when Blender is built without internationalization support.\n"
+"      Does nothing when Blender is built without internationalization support.\n"
 "\n"
 "   :arg module_name: The name identifying the addon.\n"
 "   :type module_name: string\n"
 "   :arg translations_dict: A dictionary built like that:\n"
-"       ``{locale: {msg_key: msg_translation, ...}, ...}``\n"
+"      ``{locale: {msg_key: msg_translation, ...}, ...}``\n"
 "   :type translations_dict: dict\n"
 "\n"
 );
@@ -337,7 +337,7 @@ PyDoc_STRVAR(app_translations_py_messages_unregister_doc,
 "   Unregisters an addon's UI translations.\n"
 "\n"
 "   .. note::\n"
-"       Does nothing when Blender is built without internationalization support.\n"
+"      Does nothing when Blender is built without internationalization support.\n"
 "\n"
 "   :arg module_name: The name identifying the addon.\n"
 "   :type module_name: string\n"
@@ -425,8 +425,8 @@ PyDoc_STRVAR(app_translations_contexts_doc,
 "A named tuple containing all pre-defined translation contexts.\n"
 "\n"
 ".. warning::\n"
-"    Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally \n"
-"    assimilated as the default one!\n"
+"   Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally\n"
+"   assimilated as the default one!\n"
 );
 
 PyDoc_STRVAR(app_translations_contexts_C_to_py_doc,
@@ -522,16 +522,16 @@ PyDoc_STRVAR(app_translations_pgettext_doc,
 "   Try to translate the given msgid (with optional msgctxt).\n"
 "\n"
 "   .. note::\n"
-"       The ``(msgid, msgctxt)`` parameters order has been switched compared to gettext function, to allow\n"
-"       single-parameter calls (context then defaults to BLT_I18NCONTEXT_DEFAULT).\n"
+"      The ``(msgid, msgctxt)`` parameters order has been switched compared to gettext function, to allow\n"
+"      single-parameter calls (context then defaults to BLT_I18NCONTEXT_DEFAULT).\n"
 "\n"
 "   .. note::\n"
-"       You should really rarely need to use this function in regular addon code, as all translation should be\n"
-"       handled by Blender internal code. The only exception are string containing formatting (like \"File: %r\"),\n"
-"       but you should rather use :func:`pgettext_iface`/:func:`pgettext_tip` in those cases!\n"
+"      You should really rarely need to use this function in regular addon code, as all translation should be\n"
+"      handled by Blender internal code. The only exception are string containing formatting (like \"File: %r\"),\n"
+"      but you should rather use :func:`pgettext_iface`/:func:`pgettext_tip` in those cases!\n"
 "\n"
 "   .. note::\n"
-"       Does nothing when Blender is built without internationalization support (hence always returns ``msgid``).\n"
+"      Does nothing when Blender is built without internationalization support (hence always returns ``msgid``).\n"
 "\n"
 "   :arg msgid: The string to translate.\n"
 "   :type msgid: string\n"
@@ -551,7 +551,7 @@ PyDoc_STRVAR(app_translations_pgettext_iface_doc,
 "   Try to translate the given msgid (with optional msgctxt), if labels' translation is enabled.\n"
 "\n"
 "   .. note::\n"
-"       See :func:`pgettext` notes.\n"
+"      See :func:`pgettext` notes.\n"
 "\n"
 "   :arg msgid: The string to translate.\n"
 "   :type msgid: string\n"
@@ -571,7 +571,7 @@ PyDoc_STRVAR(app_translations_pgettext_tip_doc,
 "   Try to translate the given msgid (with optional msgctxt), if tooltips' translation is enabled.\n"
 "\n"
 "   .. note::\n"
-"       See :func:`pgettext` notes.\n"
+"      See :func:`pgettext` notes.\n"
 "\n"
 "   :arg msgid: The string to translate.\n"
 "   :type msgid: string\n"
@@ -591,7 +591,7 @@ PyDoc_STRVAR(app_translations_pgettext_data_doc,
 "   Try to translate the given msgid (with optional msgctxt), if new data name's translation is enabled.\n"
 "\n"
 "   .. note::\n"
-"       See :func:`pgettext` notes.\n"
+"      See :func:`pgettext` notes.\n"
 "\n"
 "   :arg msgid: The string to translate.\n"
 "   :type msgid: string\n"
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index b542f32f844..9837017b8b1 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -90,7 +90,7 @@ static PyObject *pyrna_prop_collection_values(BPy_PropertyRNA *self);
 #define BPY_DOC_ID_PROP_TYPE_NOTE                                             \
 "   .. note::\n"                                                              \
 "\n"                                                                          \
-"      Only :class:`bpy.types.ID`, :class:`bpy.types.Bone` and \n"            \
+"      Only :class:`bpy.types.ID`, :class:`bpy.types.Bone` and\n"             \
 "      :class:`bpy.types.PoseBone` classes support custom properties.\n"
 
 
@@ -7309,7 +7309,7 @@ static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item
 				    RNA_struct_idprops_contains_datablock(type_srna))
 				{
 					PyErr_Format(PyExc_ValueError,
-					             "bpy_struct \"%.200s\" doesn't support datablock properties \n",
+					             "bpy_struct \"%.200s\" doesn't support datablock properties\n",
 					             RNA_struct_identifier(srna));
 					return -1;
 				}
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index bf603502ec2..645fa96c22e 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1260,17 +1260,17 @@ PyDoc_STRVAR(quaternion_doc,
 "   The constructor takes arguments in various forms:\n"
 "\n"
 "   (), *no args*\n"
-"       Create an identity quaternion\n"
+"      Create an identity quaternion\n"
 "   (*wxyz*)\n"
-"       Create a quaternion from a ``(w, x, y, z)`` vector.\n"
+"      Create a quaternion from a ``(w, x, y, z)`` vector.\n"
 "   (*exponential_map*)\n"
-"       Create a quaternion from a 3d exponential map vector.\n"
+"      Create a quaternion from a 3d exponential map vector.\n"
 "\n"
-"       .. seealso:: :meth:`to_exponential_map`\n"
+"      .. seealso:: :meth:`to_exponential_map`\n"
 "   (*axis, angle*)\n"
-"       Create a quaternion representing a rotation of *angle* radians over *axis*.\n"
+"      Create a quaternion representing a rotation of *angle* radians over *axis*.\n"
 "\n"
-"       .. seealso:: :meth:`to_axis_angle`\n"
+"      .. seealso:: :meth:`to_axis_angle`\n"
 );
 PyTypeObject quaternion_Type = {
 	PyVarObject_HEAD_INIT(NULL, 0)
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index c759653c5cf..371733ea147 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -860,7 +860,7 @@ static PyObject *M_Geometry_intersect_point_tri_2d(PyObject *UNUSED(self), PyObj
 PyDoc_STRVAR(M_Geometry_intersect_point_quad_2d_doc,
 ".. function:: intersect_point_quad_2d(pt, quad_p1, quad_p2, quad_p3, quad_p4)\n"
 "\n"
-"   Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad, \n"
+"   Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad,\n"
 "   only the x and y are used from the vectors. Returns 1 if the point is within the quad, otherwise 0.\n"
 "   Works only with convex quads without singular edges.\n"
 "\n"



More information about the Bf-blender-cvs mailing list