Skip to content

gh-94246: Prefer user argument names in AC doctrings#94248

Closed
arhadthedev wants to merge 3 commits into
python:mainfrom
arhadthedev:prefer-user-names
Closed

gh-94246: Prefer user argument names in AC doctrings#94248
arhadthedev wants to merge 3 commits into
python:mainfrom
arhadthedev:prefer-user-names

Conversation

@arhadthedev

@arhadthedev arhadthedev commented Jun 24, 2022

Copy link
Copy Markdown
Member

The fixed Argument Clinic now converts this:

/*[clinic input]
my_method
    _foo: self(type="PyObject *")
    module: object
[clinic start generated code]*/

to this:

/*[clinic input]
preserve
[clinic start generated code]*/

PyDoc_STRVAR(my_method__doc__,
"my_method($_foo, /, module)\n"
"--\n"
"\n");

[snip]

instead of previous, incorrect:

/*[clinic input]
preserve
[clinic start generated code]*/

PyDoc_STRVAR(my_method__doc__,
"my_method($module, /, module)\n"
"--\n"
"\n");

[snip]

Note: already existing generated files are updated with python Tools/clinic/clinic.py --make --srcdir .

@arhadthedev

Copy link
Copy Markdown
Member Author

Argument Clinic seems to have no dedicated tests; marking as ready for review.

@arhadthedev arhadthedev marked this pull request as ready for review June 24, 2022 22:00
@erlend-aasland

Copy link
Copy Markdown
Contributor

Argument Clinic seems to have no dedicated tests; marking as ready for review.

See Lib/test/clinic.test

@arhadthedev

Copy link
Copy Markdown
Member Author

Closing in favor of gh-94431 that fixes a fundamental problem.

@arhadthedev arhadthedev deleted the prefer-user-names branch June 29, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants