Skip to content

docs(fix): resolve stale jointset references and joints() forward-ref warning#556

Merged
petercorke merged 1 commit into
mainfrom
docs/fix-stale-jointset-refs
Jul 20, 2026
Merged

docs(fix): resolve stale jointset references and joints() forward-ref warning#556
petercorke merged 1 commit into
mainfrom
docs/fix-stale-jointset-refs

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • jointset() was renamed to jindex_set() back in 2022 (f3bc1392) — 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 referencing a method that hasn't existed for three years.
  • 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). sphinx_autodoc_typehints fails to resolve it, producing "name 'ET' is not defined" for both ETS.ETS.joints and ETS2.ETS2.joints (same inherited method). Corrected to list[BaseET].
  • Investigated resurrecting the older 9922d07d "resolve reST syntax and structural Sphinx build warnings" commit as well — turned out its entire scope is already satisfied on main (the etaparam/axiskind renames 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-restructure independently already covered the conf.py/template fixes). No changes needed there.

Test plan

  • Full suite green (620 passed, 72 skipped).
  • Sphinx build warnings down from 8 → 4 (remaining: KinematicCache, SensorBase, a guarded matplotlib Color import — unrelated, pre-existing, left for another pass).

… 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

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (756e101) to head (4531d93).

Files with missing lines Patch % Lines
src/roboticstoolbox/ets/_ETS.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petercorke
petercorke merged commit 298f4c0 into main Jul 20, 2026
18 checks passed
@petercorke
petercorke deleted the docs/fix-stale-jointset-refs branch July 20, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant