Skip to content
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

gh-126273: added clinic docstrings to elementtree #126274

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pan324
Copy link
Contributor

@pan324 pan324 commented Nov 1, 2024

@skirpichev
Copy link
Member

clinic/* files are autogenerated by Tools/clinic/clinic.py. You should modify instead clinic input - Modules/_elementtree.c in your case, I guess.

See also: https://devguide.python.org/development-tools/clinic/

@pan324
Copy link
Contributor Author

pan324 commented Nov 1, 2024

Thanks, will do that now.

@skirpichev skirpichev self-requested a review November 1, 2024 13:08
Comment on lines +1259 to +1260
*path* is a string having either an element tag or an XPath,
*namespaces* is an optional mapping from namespace prefix to full name.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using per-parameter docstrings here (see the Argument Clinic Howto for inspiration).

Consider this also for the rest of the PR.

*path* is a string having either an element tag or an XPath,
*namespaces* is an optional mapping from namespace prefix to full name.
Returns list containing all matching elements in document order.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consistently use the imperative mood for reference prose. Ditto for the rest of the PR.

Suggested change
Returns list containing all matching elements in document order.
Return a list containing all matching elements in document order.

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.

4 participants