Fix four docstring parameter names that do not match the signature - #778
Merged
ManonMarchand merged 2 commits intoAug 4, 2026
Merged
Conversation
- rtcons.py: TemporalConstraint documents spec, the argument is times - sia2.py: SIA2Service documents url, the argument is baseurl. The module level search() really does take url, so only the class was changed - elements.py: parse_for_object documents object, the argument is object_type - mivot_utils.py: populate_instance documents as_literal, the argument is as_literals. Same line said 'default isTrue', now 'default is True' Docstrings only.
Member
|
Thank you! For The two missing asserts could be in a separate PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #778 +/- ##
=======================================
Coverage 80.52% 80.52%
=======================================
Files 90 90
Lines 10352 10352
=======================================
Hits 8336 8336
Misses 2016 2016 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ManonMarchand
approved these changes
Aug 4, 2026
ManonMarchand
left a comment
Member
There was a problem hiding this comment.
Approving, but I'm not merging right away in case you want to add capability_description
Wording suggested by the maintainer in review.
Contributor
Author
|
Added, with your wording. Tests still 519 passed, 107 skipped, 1 xfailed. I will send the two missing asserts in |
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.
Problem
Four docstrings name a parameter the function does not take, so the parameter that is really there goes undocumented and the one in the docs cannot be passed.
registry/rtcons.py:1044specdef __init__(self, times, *, inclusive=False)dal/sia2.py:166urldef __init__(self, baseurl, *, capability_description=None, ...)utils/xml/elements.py:30objectdef parse_for_object(source, object_type, ...)mivot/utils/mivot_utils.py:296as_literaldef populate_instance(..., as_literals=True, ...)The
mivot_utils.pyone is a droppeds, and the same line reads(default isTrue)with the space missing.sia2.pyneeded care: the module levelsearch()at line 119 genuinely takesurl, so that docstring is correct and untouched. Only theSIA2Serviceconstructor at 166 was wrong.Change
Renamed the four in the docstrings to match the signatures. Docstrings only, no code touched.
Checks
Found by a script that pulls every numpydoc
Parametersname out of a docstring and compares it against the identifiers in the signature below it. It reported these four before the change and none after. All four were read by hand before touching.Two more things I noticed, not included here
dal/tests/test_query.py:586has two statements with theassertmissing, sotest_columnaliasesdoes not actually check them:I checked that the behaviour is already correct, the test passes either way once the asserts are added, so this is about the test guarding what it claims rather than about a bug. Happy to send it separately, or fold it in here if you would rather have one PR.
dal/sia2.py:166, the same block, documentssessionandcheck_baseurlbut notcapability_description. I left that alone rather than write a description for a parameter whose intent I would be guessing at.