Skip to content

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

Open
petercorke wants to merge 1 commit into
mainfrom
fix/models-list-mtype-param
Open

fix(models): rename list()'s type= param to mtype=, matching stale docs#542
petercorke wants to merge 1 commit 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

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>
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