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:
@@ -270,9 +270,10 @@ PyDoc_STRVAR(
|
||||
" Insert data into the buffer for a single attribute.\n"
|
||||
"\n"
|
||||
" :arg id: Either the name or the id of the attribute.\n"
|
||||
" :type id: int or str\n"
|
||||
" :arg data: Sequence of data that should be stored in the buffer\n"
|
||||
" :type data: sequence of floats, ints, vectors or matrices\n");
|
||||
" :type id: int | str\n"
|
||||
" :arg data: Buffer or sequence of data that should be stored in the buffer\n"
|
||||
" :type data: Buffer | "
|
||||
"Sequence[float] | Sequence[int] | Sequence[Sequence[float]] | Sequence[Sequence[int]]\n");
|
||||
static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *data;
|
||||
|
||||
Reference in New Issue
Block a user