Skip to content

fix(models): rename list()'s type= param to mtype=, matching stale docs#542

Merged
petercorke merged 2 commits into
mainfrom
fix/models-list-mtype-param
Jul 5, 2026
Merged

fix(models): rename list()'s type= param to mtype=, matching stale docs#542
petercorke merged 2 commits into
mainfrom
fix/models-list-mtype-param

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • docs/source/arm_dh.rst/arm_erobot.rst runblock examples called rtb.models.list(mtype="DH"), but the actual parameter was named type= — a stale-docs bug, and one that also shadowed the builtin type.
  • Renamed the parameter to mtype (matching what the docs already expected) rather than fixing the docs to say type=, since that also resolves the builtin shadowing.
  • Updated the one test call site (tests/test_models.py) to match.
  • Logged remaining tech debt: the list() function itself still shadows builtin list — deferred since renaming public API (rtb.models.list) is a breaking change.

Test plan

  • Rehearsed in a clean venv: rtb.models.list(mtype='DH') prints the table correctly
  • pytest tests/test_models.py — 28 passed

🤖 Generated with Claude Code

petercorke and others added 2 commits July 5, 2026 16:21
The runblock examples in arm_dh.rst/arm_erobot.rst called
rtb.models.list(mtype=...), but the actual parameter was named type=,
shadowing the builtin. Renaming the parameter to mtype (rather than
fixing the docs to say type=) avoids the builtin shadow and matches
what the docs already expected.

list() the function still shadows builtin list; logged as tech debt
since renaming public API needs a breaking-change pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@petercorke petercorke merged commit c1402f6 into main Jul 5, 2026
15 of 16 checks passed
@petercorke petercorke deleted the fix/models-list-mtype-param branch July 5, 2026 08:11
@github-actions github-actions Bot mentioned this pull request Jul 5, 2026
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