Skip to content

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

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

Closed
wants to merge 3 commits into from

Conversation

arhadthedev
Copy link
Member

@arhadthedev arhadthedev commented Jun 24, 2022

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
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
Contributor

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

See Lib/test/clinic.test

@arhadthedev
Copy link
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