Skip to content

Add missing PyDoc_STR calls #109393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Modules/_ctypes/cfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};

Expand Down
4 changes: 2 additions & 2 deletions Modules/_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 1 addition & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}
};

Expand Down
4 changes: 2 additions & 2 deletions Objects/typevarobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};

Expand Down
3 changes: 2 additions & 1 deletion Objects/unionobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}
};

Expand Down