[Bf-blender-cvs] [2af06f86970] temp-T97352-3d-texturing-seam-bleeding-b2: Cleanup: prefer 'arg' over 'params' for sphinx documentation
Campbell Barton
noreply at git.blender.org
Tue Sep 20 10:32:15 CEST 2022
Commit: 2af06f86970e1c58416700c5a8dc3a85dca75c89
Author: Campbell Barton
Date: Mon Sep 19 14:22:31 2022 +1000
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB2af06f86970e1c58416700c5a8dc3a85dca75c89
Cleanup: prefer 'arg' over 'params' for sphinx documentation
While both are supported, 'arg' is in more common use so prefer it.
===================================================================
M release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py
M release/scripts/modules/bl_console_utils/autocomplete/complete_import.py
M release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py
M release/scripts/modules/bl_console_utils/autocomplete/intellisense.py
M source/blender/draw/intern/DRW_gpu_wrapper.hh
M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M source/blender/python/gpu/gpu_py_batch.c
M source/blender/python/gpu/gpu_py_element.c
M source/blender/python/gpu/gpu_py_framebuffer.c
M source/blender/python/gpu/gpu_py_matrix.c
M source/blender/python/gpu/gpu_py_select.c
M source/blender/python/gpu/gpu_py_shader.c
M source/blender/python/gpu/gpu_py_shader_create_info.cc
M source/blender/python/gpu/gpu_py_state.c
M source/blender/python/gpu/gpu_py_texture.c
M source/blender/python/gpu/gpu_py_vertex_buffer.c
M source/blender/python/gpu/gpu_py_vertex_format.c
M source/blender/python/intern/bpy_rna_operator.c
M source/blender/python/intern/bpy_rna_types_capi.c
M source/blender/python/mathutils/mathutils_Color.c
M source/blender/python/mathutils/mathutils_Euler.c
M source/blender/python/mathutils/mathutils_Matrix.c
M source/blender/python/mathutils/mathutils_Quaternion.c
M source/blender/python/mathutils/mathutils_Vector.c
M tests/python/modifiers.py
M tests/python/modules/mesh_test.py
M tests/python/modules/test_utils.py
===================================================================
diff --git a/release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py b/release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py
index 07ccac81f91..419a6dc9852 100644
--- a/release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/complete_calltip.py
@@ -29,7 +29,7 @@ RE_DEF_COMPLETE = re.compile(
def reduce_newlines(text):
"""Reduces multiple newlines to a single newline.
- :param text: text with multiple newlines
+ :arg text: text with multiple newlines
:type text: str
:returns: text with single newlines
:rtype: str
@@ -43,7 +43,7 @@ def reduce_newlines(text):
def reduce_spaces(text):
"""Reduces multiple whitespaces to a single space.
- :param text: text with multiple spaces
+ :arg text: text with multiple spaces
:type text: str
:returns: text with single spaces
:rtype: str
@@ -57,7 +57,7 @@ def reduce_spaces(text):
def get_doc(obj):
"""Get the doc string or comments for an object.
- :param object: object
+ :arg object: object
:returns: doc string
:rtype: str
@@ -71,11 +71,11 @@ def get_doc(obj):
def get_argspec(func, *, strip_self=True, doc=None, source=None):
"""Get argument specifications.
- :param strip_self: strip `self` from argspec
+ :arg strip_self: strip `self` from argspec
:type strip_self: bool
- :param doc: doc string of func (optional)
+ :arg doc: doc string of func (optional)
:type doc: str
- :param source: source code of func (optional)
+ :arg source: source code of func (optional)
:type source: str
:returns: argument specification
:rtype: str
@@ -131,11 +131,11 @@ def get_argspec(func, *, strip_self=True, doc=None, source=None):
def complete(line, cursor, namespace):
"""Complete callable with calltip.
- :param line: incomplete text line
+ :arg line: incomplete text line
:type line: str
- :param cursor: current character position
+ :arg cursor: current character position
:type cursor: int
- :param namespace: namespace
+ :arg namespace: namespace
:type namespace: dict
:returns: (matches, world, scrollback)
:rtype: (list of str, str, str)
diff --git a/release/scripts/modules/bl_console_utils/autocomplete/complete_import.py b/release/scripts/modules/bl_console_utils/autocomplete/complete_import.py
index 1a97e408b70..c506e674cd5 100644
--- a/release/scripts/modules/bl_console_utils/autocomplete/complete_import.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/complete_import.py
@@ -76,7 +76,7 @@ def module_list(path):
Return the list containing the names of the modules available in
the given folder.
- :param path: folder path
+ :arg path: folder path
:type path: str
:returns: modules
:rtype: list
@@ -107,7 +107,7 @@ def complete(line):
"""
Returns a list containing the completion possibilities for an import line.
- :param line:
+ :arg line:
incomplete line which contains an import statement::
diff --git a/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py b/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py
index 096e5596fc6..b1b751c96ab 100644
--- a/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py
@@ -27,9 +27,9 @@ def is_struct_seq(obj):
def complete_names(word, namespace):
"""Complete variable names or attributes
- :param word: word to be completed
+ :arg word: word to be completed
:type word: str
- :param namespace: namespace
+ :arg namespace: namespace
:type namespace: dict
:returns: completion matches
:rtype: list of str
@@ -50,12 +50,12 @@ def complete_indices(word, namespace, *, obj=None, base=None):
* integer numbers for list
* any keys for dictionary
- :param word: word to be completed
+ :arg word: word to be completed
:type word: str
- :param namespace: namespace
+ :arg namespace: namespace
:type namespace: dict
- :param obj: object evaluated from base
- :param base: sub-string which can be evaluated into an object.
+ :arg obj: object evaluated from base
+ :arg base: sub-string which can be evaluated into an object.
:type base: str
:returns: completion matches
:rtype: list of str
@@ -103,11 +103,11 @@ def complete(word, namespace, *, private=True):
"""Complete word within a namespace with the standard rlcompleter
module. Also supports index or key access [].
- :param word: word to be completed
+ :arg word: word to be completed
:type word: str
- :param namespace: namespace
+ :arg namespace: namespace
:type namespace: dict
- :param private: whether private attribute/methods should be returned
+ :arg private: whether private attribute/methods should be returned
:type private: bool
:returns: completion matches
:rtype: list of str
diff --git a/release/scripts/modules/bl_console_utils/autocomplete/intellisense.py b/release/scripts/modules/bl_console_utils/autocomplete/intellisense.py
index e53e38dbc53..7aff3596c42 100644
--- a/release/scripts/modules/bl_console_utils/autocomplete/intellisense.py
+++ b/release/scripts/modules/bl_console_utils/autocomplete/intellisense.py
@@ -43,13 +43,13 @@ def complete(line, cursor, namespace, private):
* index completion for lists and dictionaries
* module completion (from/import)
- :param line: incomplete text line
+ :arg line: incomplete text line
:type line: str
- :param cursor: current character position
+ :arg cursor: current character position
:type cursor: int
- :param namespace: namespace
+ :arg namespace: namespace
:type namespace: dict
- :param private: whether private variables should be listed
+ :arg private: whether private variables should be listed
:type private: bool
:returns: list of completions, word
:rtype: list, str
@@ -82,13 +82,13 @@ def expand(line, cursor, namespace, *, private=True):
"""This method is invoked when the user asks autocompletion,
e.g. when Ctrl+Space is clicked.
- :param line: incomplete text line
+ :arg line: incomplete text line
:type line: str
- :param cursor: current character position
+ :arg cursor: current character position
:type cursor: int
- :param namespace: namespace
+ :arg namespace: namespace
:type namespace: dict
- :param private: whether private variables should be listed
+ :arg private: whether private variables should be listed
:type private: bool
:returns:
diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh
index 90ba926f0d1..d53c5fbeaa5 100644
--- a/source/blender/draw/intern/DRW_gpu_wrapper.hh
+++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh
@@ -928,7 +928,8 @@ class TextureFromPool : public Texture, NonMovable {
* Dummy type to bind texture as image.
* It is just a GPUTexture in disguise.
*/
-class Image {};
+class Image {
+};
static inline Image *as_image(GPUTexture *tex)
{
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 6d0ede03680..9bab1f7a939 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -3415,7 +3415,7 @@ static void lineart_triangle_intersect_in_bounding_area(LineartTriangle *tri,
}
tt->testing_e[th->thread_id] = (LineartEdge *)tri;
- if(!((testing_triangle->flags | tri->flags) & LRT_TRIANGLE_FORCE_INTERSECTION)){
+ if (!((testing_triangle->flags | tri->flags) & LRT_TRIANGLE_FORCE_INTERSECTION)) {
if ((testing_triangle->flags & LRT_TRIANGLE_NO_INTERSECTION) ||
(testing_triangle->flags & tri->flags & LRT_TRIANGLE_INTERSECTION_ONLY)) {
continue;
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index 533e5154d83..879e1c0ce8b 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -127,7 +127,7 @@ PyDoc_STRVAR(pygpu_batch_vertbuf_add_doc,
" vertex buffer for vertex positions and vertex normals.\n"
" Current a batch can have at most " STRINGIFY(GPU_BATCH_VBO_MAX_LEN) " vertex buffers.\n"
"\n"
-" :param buf: The vertex buffer that will be added to the batch.\n"
+" :arg buf: The vertex buffer that will be added to the batch.\n"
" :type buf: :class:`gpu.types.GPUVertBuf`\n"
);
static PyObject *pygpu_batch_vertbuf_add(BPyGPUBatch *self, BPyGPUVertBuf *py_buf)
@@ -171,7 +171,7 @@ PyDoc_STRVAR(
" This function does not need to be called when you always\n"
" set the shader when calling :meth:`gpu.types.GPUBatch.draw`.\n"
"\n"
- " :param program: The program/shader the batch will use in future draw calls.\n"
+ " :arg program: The program/shader the batch will use in future draw calls.\n"
" :type program: :class:`gpu.types.GPUShader`\n");
static PyObject *pygpu_batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_shader)
{
@@ -209,7 +209,7 @@ PyDoc_STRVAR(pygpu_batch_draw_doc,
"\n"
" Run the drawing program with the parameters assigned to the batch.\n"
"\n"
- " :param program: Program that performs the drawing operations.\n"
+ " :arg program: Program that performs the drawing operations.\n"
" If ``None`` is passed, the last program set to this batch will run.\n"
" :type program: :class:`gpu.types.GPUShader`\n");
static PyObject *pygpu_batch_draw(BPyGPUBatch *self, PyObject *args)
diff --git a/source/blender/python/gpu/gpu_py_element.c b/source/blender/python/gpu/gpu_py_element.c
index d52a97c0c84..46f1d4d49eb 100644
--- a/source/blender/python/gpu/gpu_py_element.c
+++ b/source/blender/python/gpu/gpu_py_element.c
@@ -180,7 +180,7 @@ PyDoc_STRVAR(pygpu_IndexBuf__tp_doc,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list