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 6 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.

@skirpichev

This comment was marked as resolved.

@ZeroIntensity

This comment was marked as resolved.

@skirpichev

This comment was marked as resolved.

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

Normally we try to align the docstrings with the reference text in the documentation. In some places, this is already done (the added docstring is similar or identical to the reference docs), but in some places it differs significantly. If the reason for the deviation is that the docs are inaccurate, we should IMO fix them (first), and then align the added docstrings to the amended docs. Moreover, my previous round of review remarks have not been addressed yet.

@bedevere-app
Copy link

bedevere-app bot commented Nov 12, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@skirpichev skirpichev removed their request for review November 14, 2024 06:43
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