Add missing `PyDoc_STR` calls (#109393)

In files:

* Modules/_ctypes/cfield.c
* Modules/_struct.c
* Objects/dictobject.c
* Objects/typevarobject.c
* Objects/unionobject.c
This commit is contained in:
Nikita Sobolev 2023-09-15 16:10:48 +03:00 committed by GitHub
parent 5eec58a9e5
commit 47af188593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 8 deletions

View File

@ -250,8 +250,8 @@ PyCField_get_size(PyObject *self, void *data)
}
static PyGetSetDef PyCField_getset[] = {
{ "offset", PyCField_get_offset, NULL, "offset in bytes of this field" },
{ "size", PyCField_get_size, NULL, "size in bytes of this field" },
{ "offset", PyCField_get_offset, NULL, PyDoc_STR("offset in bytes of this field") },
{ "size", PyCField_get_size, NULL, PyDoc_STR("size in bytes of this field") },
{ NULL, NULL, NULL, NULL },
};

View File

@ -2198,8 +2198,8 @@ static PyMemberDef s_members[] = {
};
static PyGetSetDef s_getsetlist[] = {
{"format", (getter)s_get_format, (setter)NULL, "struct format string", NULL},
{"size", (getter)s_get_size, (setter)NULL, "struct size in bytes", NULL},
{"format", (getter)s_get_format, (setter)NULL, PyDoc_STR("struct format string"), NULL},
{"size", (getter)s_get_size, (setter)NULL, PyDoc_STR("struct size in bytes"), NULL},
{NULL} /* sentinel */
};

View File

@ -4643,7 +4643,7 @@ dictview_mapping(PyObject *view, void *Py_UNUSED(ignored)) {
static PyGetSetDef dictview_getset[] = {
{"mapping", dictview_mapping, (setter)NULL,
"dictionary that this view refers to", NULL},
PyDoc_STR("dictionary that this view refers to"), NULL},
{0}
};

View File

@ -806,8 +806,8 @@ paramspec_kwargs(PyObject *self, void *unused)
}
static PyGetSetDef paramspec_getset[] = {
{"args", (getter)paramspec_args, NULL, "Represents positional arguments.", NULL},
{"kwargs", (getter)paramspec_kwargs, NULL, "Represents keyword arguments.", NULL},
{"args", (getter)paramspec_args, NULL, PyDoc_STR("Represents positional arguments."), NULL},
{"kwargs", (getter)paramspec_kwargs, NULL, PyDoc_STR("Represents keyword arguments."), NULL},
{0},
};

View File

@ -331,7 +331,8 @@ union_parameters(PyObject *self, void *Py_UNUSED(unused))
}
static PyGetSetDef union_properties[] = {
{"__parameters__", union_parameters, (setter)NULL, "Type variables in the types.UnionType.", NULL},
{"__parameters__", union_parameters, (setter)NULL,
PyDoc_STR("Type variables in the types.UnionType."), NULL},
{0}
};