chore(examples): simplify count parameter in start_here.py#397
Open
chore(examples): simplify count parameter in start_here.py#397
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the count parameter in the start_here.py example to avoid VSCode warnings that confuse users. The change removes Pydantic Field validation in favor of a simple int parameter with an inline comment, making the example more accessible to new users.
Changes:
- Simplified the
countparameter fromField(default=1, ge=1, le=10, description="...")to a plainint = 1with an inline comment explaining its purpose
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/start_here.py
Outdated
| count: int = Field( | ||
| default=1, ge=1, le=10, description="The number of times to repeat the movement" | ||
| ), | ||
| count: int = 1, # optional input parameter that in this case is used for repeating the execution |
There was a problem hiding this comment.
The trailing comma after the count parameter is inconsistent with other function definitions in the codebase. Other async functions in the examples (e.g., move_multiple_robots, main in signals.py) don't use trailing commas after the last parameter. Consider removing the comma for consistency.
Suggested change
| count: int = 1, # optional input parameter that in this case is used for repeating the execution | |
| count: int = 1 # optional input parameter that in this case is used for repeating the execution |
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5fe6e4a to
99de25a
Compare
Add a highlighted callout box promoting the DeepWiki documentation and its interactive chat feature for getting code examples and explanations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.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.
The "Field" input variable causes warnings in the VSCode app that confuse users. A simple int variable with a comment should be sufficient.