Cleanup: repeated terms in code comments & error messages

This commit is contained in:
Campbell Barton
2021-06-28 15:44:12 +10:00
parent 23c4854f45
commit 1d8648b13a
78 changed files with 136 additions and 133 deletions

View File

@@ -252,7 +252,7 @@ static int bpy_slot_from_py(BMesh *bm,
const ushort size = pymat->num_col;
if ((size != pymat->num_row) || (!ELEM(size, 3, 4))) {
PyErr_Format(PyExc_TypeError,
"%.200s: keyword \"%.200s\" expected a 3x3 or 4x4 matrix Matrix",
"%.200s: keyword \"%.200s\" expected a 3x3 or 4x4 matrix",
opname,
slot_name);
return -1;

View File

@@ -3354,7 +3354,7 @@ static void bpy_bmesh_dealloc(BPy_BMesh *self)
{
BMesh *bm = self->bm;
/* have have been freed by bmesh */
/* The mesh has not been freed by #BMesh. */
if (bm) {
bm_dealloc_editmode_warn(self);

View File

@@ -683,7 +683,7 @@ Buffer *BGL_MakeBuffer(int type, int ndimensions, int *dimensions, void *initbuf
size *= dimensions[i];
}
buf = MEM_mallocN(size, "Buffer buffer");
buf = MEM_mallocN(size, __func__);
buffer = BGL_MakeBuffer_FromData(NULL, type, ndimensions, dimensions, buf);
@@ -790,7 +790,7 @@ static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject
}
else {
PyErr_Format(PyExc_TypeError,
"invalid second argument argument expected a sequence "
"invalid second argument expected a sequence "
"or an int, not a %.200s",
Py_TYPE(length_ob)->tp_name);
return NULL;

View File

@@ -1051,7 +1051,7 @@ static PyObject *BPy_IDGroup_IterItems_CreatePyObject(BPy_IDProperty *group, con
/** \name ID-Property Group View Types (Keys/Values/Items)
*
* This view types is a thin wrapper on keys/values/items, this matches Python's `dict_view` type.
* The is returned by `property.keys()` and is separate from the iterator that loops over keys.
* This is returned by `property.keys()` and is separate from the iterator that loops over keys.
*
* There are some less common features this type could support (matching Python's `dict_view`)
*

View File

@@ -178,7 +178,7 @@ static PyObject *py_imbuf_copy(Py_ImBuf *self)
if (UNLIKELY(ibuf_copy == NULL)) {
PyErr_SetString(PyExc_MemoryError,
"ImBuf.copy(): "
"failed to allocate memory memory");
"failed to allocate memory");
return NULL;
}
return Py_ImBuf_CreatePyObject(ibuf_copy);