Skip to content

Conversation

tleonhardt
Copy link
Member

Simplify subcommand example within argparse_example.py to be a simple calculate command with add and subtract subcommands.

The original subcommand example was overly complicated. This replaces it with a much simpler one that is easier to digest and understand.

Also switched to using the cmd2.as_subcommand_to decorator.

The original example was overly complicated. This replaces it with a much simpler one that is easier to digest and understand. Also switched to using the `cmd2.as_subcommand_to` decorator.
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.78%. Comparing base (61273d6) to head (68f6ab0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1498      +/-   ##
==========================================
+ Coverage   98.76%   98.78%   +0.02%     
==========================================
  Files          23       23              
  Lines        4925     4925              
==========================================
+ Hits         4864     4865       +1     
+ Misses         61       60       -1     
Flag Coverage Δ
unittests 98.78% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kmvanbrunt kmvanbrunt self-requested a review September 1, 2025 22:41
@tleonhardt tleonhardt merged commit def9524 into main Sep 1, 2025
30 checks passed
@tleonhardt tleonhardt deleted the as_subcommand_to branch September 1, 2025 23:34
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.

2 participants