Skip to content

GH-137623: Begin enforcing docstring length in Argument Clinic #137624

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 9 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from 7 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
20 changes: 14 additions & 6 deletions Lib/test/clinic.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -5084,14 +5084,18 @@ Test_an_metho_arg_named_arg_impl(TestObj *self, int arg)
Test.__init__
*args: tuple

Varargs init method. For example, nargs is translated to PyTuple_GET_SIZE.
Varargs init method.

For example, nargs is translated to PyTuple_GET_SIZE.
[clinic start generated code]*/

PyDoc_STRVAR(Test___init____doc__,
"Test(*args)\n"
"--\n"
"\n"
"Varargs init method. For example, nargs is translated to PyTuple_GET_SIZE.");
"Varargs init method.\n"
"\n"
"For example, nargs is translated to PyTuple_GET_SIZE.");

static int
Test___init___impl(TestObj *self, PyObject *args);
Expand Down Expand Up @@ -5120,21 +5124,25 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs)

static int
Test___init___impl(TestObj *self, PyObject *args)
/*[clinic end generated code: output=f172425cec373cd6 input=4b8388c4e6baab6f]*/
/*[clinic end generated code: output=0e5836c40dbc2397 input=a615a4485c0fc3e2]*/

/*[clinic input]
@classmethod
Test.__new__
*args: tuple

Varargs new method. For example, nargs is translated to PyTuple_GET_SIZE.
Varargs new method.

For example, nargs is translated to PyTuple_GET_SIZE.
[clinic start generated code]*/

PyDoc_STRVAR(Test__doc__,
"Test(*args)\n"
"--\n"
"\n"
"Varargs new method. For example, nargs is translated to PyTuple_GET_SIZE.");
"Varargs new method.\n"
"\n"
"For example, nargs is translated to PyTuple_GET_SIZE.");

static PyObject *
Test_impl(PyTypeObject *type, PyObject *args);
Expand Down Expand Up @@ -5162,7 +5170,7 @@ Test(PyTypeObject *type, PyObject *args, PyObject *kwargs)

static PyObject *
Test_impl(PyTypeObject *type, PyObject *args)
/*[clinic end generated code: output=ee1e8892a67abd4a input=a8259521129cad20]*/
/*[clinic end generated code: output=e6fba0c8951882fd input=8ce30adb836aeacb]*/


/*[clinic input]
Expand Down
6 changes: 3 additions & 3 deletions Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3295,15 +3295,15 @@ dir_fd, effective_ids, and follow_symlinks may not be implemented
NotImplementedError.

Note that most operations will use the effective uid/gid, therefore this
routine can be used in a suid/sgid environment to test if the invoking user
has the specified access to the path.
routine can be used in a suid/sgid environment to test if the invoking
user has the specified access to the path.

[clinic start generated code]*/

static int
os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
int effective_ids, int follow_symlinks)
/*[clinic end generated code: output=cf84158bc90b1a77 input=3ffe4e650ee3bf20]*/
/*[clinic end generated code: output=cf84158bc90b1a77 input=c33565f7584b99e4]*/
{
int return_value;

Expand Down
Loading
Loading