-
Notifications
You must be signed in to change notification settings - Fork 129
Added public API for attaching/detaching a subcommand with an existing parser. #1623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
e727360
Added attach_subcommand() and detach_subcommand() to public API.
kmvanbrunt 043d225
Moved set_parser_prog() to Cmd2ArgumentParser.update_prog().
kmvanbrunt 179e119
Fixing logic in update_prog().
kmvanbrunt e0702f2
Simplifying code.
kmvanbrunt e07f44e
Copying argparse's method for setting a subcommand's prog value.
kmvanbrunt ad4a3de
More updates to update_prog().
kmvanbrunt cbeb22d
Updated argparse_custom unit tests.
kmvanbrunt 3104948
Added another test.
kmvanbrunt 6344e23
More test updates.
kmvanbrunt 0d24308
Simplified function.
kmvanbrunt 6f7ca85
Updated comments and type hint.
kmvanbrunt d6a274c
Updated save_help_text.py example script.
kmvanbrunt 7be23d2
Added more tests.
kmvanbrunt ac5e899
Fixed tests on Python 3.14+.
kmvanbrunt 5dc1f98
Prevent redundant traversal of parser aliases.
kmvanbrunt 13c5742
Increased code coverage.
kmvanbrunt 31af376
Removed monkey patches and improved type hints.
kmvanbrunt 82100df
Updated tests.
kmvanbrunt a1e253a
Updated comments.
kmvanbrunt caac18e
Using argparse to build 'prog' prefix instead of trying to reproduce …
kmvanbrunt f8d032f
Fixed aliases type in test.
kmvanbrunt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update anything in the documentation in relation to this PR? Perhaps in the migration guide for 4.x?