fix(models): rename list()'s type= param to mtype=, matching stale docs#542
Open
petercorke wants to merge 1 commit into
Open
fix(models): rename list()'s type= param to mtype=, matching stale docs#542petercorke wants to merge 1 commit into
petercorke wants to merge 1 commit into
Conversation
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>
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
docs/source/arm_dh.rst/arm_erobot.rstrunblock examples calledrtb.models.list(mtype="DH"), but the actual parameter was namedtype=— a stale-docs bug, and one that also shadowed the builtintype.mtype(matching what the docs already expected) rather than fixing the docs to saytype=, since that also resolves the builtin shadowing.tests/test_models.py) to match.list()function itself still shadows builtinlist— deferred since renaming public API (rtb.models.list) is a breaking change.Test plan
rtb.models.list(mtype='DH')prints the table correctlypytest tests/test_models.py— 28 passed🤖 Generated with Claude Code