docs(fix): resolve stale jointset references and joints() forward-ref warning#556
Merged
Conversation
… warning `jointset()` was renamed to `jindex_set()` back in 2022 (f3bc139) - the tests were updated then, but arm_ets.rst's :members: list and two docstring examples inside _ETS.py (BaseETS.jindex_set/.jindices) were never updated, still calling a method that hasn't existed for three years. Also fixed BaseETS.joints()'s return type: `-> list[ET]` referenced the concrete 3D `ET` class, which _ETS.py never imports (it only imports the shared `BaseET` - correct, since this method lives on the base class shared by both ETS and ETS2). Under `from __future__ import annotations` this doesn't error at runtime, but sphinx_autodoc_typehints tries to resolve it for docs and fails, producing "name 'ET' is not defined" for both ETS.ETS.joints and ETS2.ETS2.joints (same inherited method). Corrected to `list[BaseET]`, matching the class's own actual type surface. `data()`/`__getitem__`'s @overload stubs also reference bare `ET`, but didn't warn (their `self: "ETS"` pins the concrete type in a way Sphinx apparently doesn't try to resolve the same way) - left alone rather than touching real overload signatures without a demonstrated warning to fix. Verified: full suite green (620 passed, 72 skipped); Sphinx build warnings down from 8 to 4 (KinematicCache, SensorBase, and a guarded matplotlib Color import remain - unrelated, left for another pass). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #556 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 141 141
Lines 13659 13659
=====================================
Misses 13659 13659 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
jointset()was renamed tojindex_set()back in 2022 (f3bc1392) — the tests were updated then, butarm_ets.rst's:members:list and two docstring examples inside_ETS.py(BaseETS.jindex_set/.jindices) were never updated, still referencing a method that hasn't existed for three years.BaseETS.joints()'s return type:-> list[ET]referenced the concrete 3DETclass, which_ETS.pynever imports (it only imports the sharedBaseET— correct, since this method lives on the base class shared by bothETSandETS2).sphinx_autodoc_typehintsfails to resolve it, producing "name 'ET' is not defined" for bothETS.ETS.jointsandETS2.ETS2.joints(same inherited method). Corrected tolist[BaseET].9922d07d"resolve reST syntax and structural Sphinx build warnings" commit as well — turned out its entire scope is already satisfied onmain(theeta→param/axis→kindrenames and the ET/ETS package split all had to rewrite the same docstring blocks it would have fixed, and did so correctly formatted;docs/intro-restructureindependently already covered theconf.py/template fixes). No changes needed there.Test plan
KinematicCache,SensorBase, a guarded matplotlibColorimport — unrelated, pre-existing, left for another pass).