Cleanup: prefer 'arg' over 'params' for sphinx documentation

While both are supported, 'arg' is in more common use so prefer it.
This commit is contained in:
2022-09-19 14:22:31 +10:00
parent 8a9f6a2e0a
commit 4baa6e57bd
27 changed files with 224 additions and 221 deletions

View File

@@ -421,9 +421,10 @@ PyDoc_STRVAR(pygpu_framebuffer_viewport_set_doc,
" Set the viewport for this framebuffer object.\n"
" Note: The viewport state is not saved upon framebuffer rebind.\n"
"\n"
" :param x, y: lower left corner of the viewport_set rectangle, in pixels.\n"
" :param xsize, ysize: width and height of the viewport_set.\n"
" :type x, y, xsize, ysize: int\n");
" :arg x, y: lower left corner of the viewport_set rectangle, in pixels.\n"
" :type x, y: int\n"
" :arg xsize, ysize: width and height of the viewport_set.\n"
" :type xsize, ysize: int\n");
static PyObject *pygpu_framebuffer_viewport_set(BPyGPUFrameBuffer *self,
PyObject *args,
void *UNUSED(type))
@@ -462,14 +463,14 @@ PyDoc_STRVAR(
"\n"
" Read a block of pixels from the frame buffer.\n"
"\n"
" :param x, y: Lower left corner of a rectangular block of pixels.\n"
" :param xsize, ysize: Dimensions of the pixel rectangle.\n"
" :arg x, y: Lower left corner of a rectangular block of pixels.\n"
" :arg xsize, ysize: Dimensions of the pixel rectangle.\n"
" :type x, y, xsize, ysize: int\n"
" :param channels: Number of components to read.\n"
" :arg channels: Number of components to read.\n"
" :type channels: int\n"
" :param slot: The framebuffer slot to read data from.\n"
" :arg slot: The framebuffer slot to read data from.\n"
" :type slot: int\n"
" :param format: The format that describes the content of a single channel.\n"
" :arg format: The format that describes the content of a single channel.\n"
" Possible values are `FLOAT`, `INT`, `UINT`, `UBYTE`, `UINT_24_8` and `10_11_11_REV`.\n"
" :type format: str\n"
" :arg data: Optional Buffer object to fill with the pixels values.\n"
@@ -569,9 +570,10 @@ PyDoc_STRVAR(pygpu_framebuffer_read_depth_doc,
"\n"
" Read a pixel depth block from the frame buffer.\n"
"\n"
" :param x, y: Lower left corner of a rectangular block of pixels.\n"
" :param xsize, ysize: Dimensions of the pixel rectangle.\n"
" :type x, y, xsize, ysize: int\n"
" :arg x, y: Lower left corner of a rectangular block of pixels.\n"
" :type x, y: int\n"
" :arg xsize, ysize: Dimensions of the pixel rectangle.\n"
" :type xsize, ysize: int\n"
" :arg data: Optional Buffer object to fill with the pixels values.\n"
" :type data: :class:`gpu.types.Buffer`\n"
" :return: The Buffer with the read pixels.\n"