Fix mistakes in time subpackage docstrings / arguments - #20216
Open
taldcroft wants to merge 1 commit into
Open
Conversation
pllim
approved these changes
Aug 6, 2026
pllim
left a comment
Member
There was a problem hiding this comment.
I marked this for backport because in general we backport documentation mistakes. However, I also see you changed the signature of __new__. Can that be backported?
Thanks!
Member
|
Also, GHA is down right now. So if you need CI, we might have to wait it out. |
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
This pull request used AI to audit the
astropy/timesubpackage for discrepancies in function arguments and docstrings.TimeBase._apply(stale docstring)formatandclswere promoted to explicit keyword-only params in the code, but the docstring still described format as something arriving viakwargsandclswas undocumented entirely. Documented both properly and dropped the stale sentence.TimeDelta.__new__(dead parameter)location=Nonewas in the signature but not the class docstring. Here the docstring was right and the signature was wrong:locationis copy-paste residue fromTime.__new__(where it's real).TimeDelta.__init__never accepted it, soTimeDelta(..., location=...)always raisedTypeError— the parameter was unreachable. Removing this parameter does not change the outcome of providinglocationwhich would still be aTypeError.