Repository navigation
Match angular_diameter_distance parameter heading to its signature - #20213
Merged
Merged
Conversation
The first parameter is z, not z1, and the section heading did not match it. comoving_distance and comoving_transverse_distance have the same (z, z2) signature and already head their sections z, z2 while keeping the z1/z2 prose; this follows them. [ci skip]
Contributor
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
Member
|
LGTM. CI is stalled... |
Member
|
CI is stalled because there is a |
Member
|
But given this is trivial docstring fix and RTD is green, if @nstarman approves, I can override the branch protection and merge. Thanks, all! |
nstarman
approved these changes
Aug 6, 2026
This comment was marked as resolved.
This comment was marked as resolved.
Member
|
Not applicable to the code in v7.2.x after all. I updated the milestone. FYI. |
pllim
added a commit
that referenced
this pull request
Aug 6, 2026
…213-on-v8.0.x Backport PR #20213 on branch v8.0.x (Match angular_diameter_distance parameter heading to its signature)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #20206.
FLRW.angular_diameter_distancehas the signaturebut heads its
Parameterssectionz1, z2. The first parameter isz, so numpydoc pairs the entry with a name the method does not have.The issue offered two options. This takes the first — rename the heading to
z, z2and leave the prose alone — because the two sibling methods with exactly this signature already do that:comoving_distance(self, z, z2=None, /)heads its sectionz, z2,comoving_transverse_distance(self, z, z2=None, /)heads its sectionz, z2,and both keep explaining the two-argument form in terms of
z1, z2in the description underneath, as this one does. So the heading matches the signature and the wording stays consistent with its neighbours.One line, docstring only — no signature, call site, or behaviour is touched.
Changelog
Not added: docstring only, so per
CONTRIBUTING.md("in general you do not need to include a changelog entry for minor documentation or test updates") this is not user-visible. Happy to add a fragment or applyno-changelog-entry-needed, whichever you prefer.