Fix broken example and improve some documentation - #1735
Merged
Conversation
- Fix broken `cmd_as_argument.py` example whose `speak` command was crashing because `str` has no `copy` method since strings are immutable in Python. - Update the startup_commands.md documentation to make it more discoverable what the recommended solution is for mixing commands at invocation with a custom argparse parser.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1735 +/- ##
==========================================
- Coverage 99.66% 99.64% -0.02%
==========================================
Files 23 23
Lines 5937 5937
==========================================
- Hits 5917 5916 -1
- Misses 20 21 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
kmvanbrunt
reviewed
Aug 25, 2026
Also: - Make one feature of `argparse_example.py` more discoverable
kmvanbrunt
self-requested a review
August 25, 2026 22:20
kmvanbrunt
previously approved these changes
Aug 25, 2026
Also: - Make some documentation more consistent with the example it was referring to
kmvanbrunt
approved these changes
Aug 25, 2026
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.
Fix broken example and improve some documentation
cmd_as_argument.pyexample whosespeakcommand was crashing becausestrhas nocopymethod since strings are immutable in Python.startup_commands.mddocumentation to make it more discoverable what the recommended solution is for mixing commands at invocation with a custom argparse parser.os.mddocumentation to make sure it is still accurate