Skip to content

Conversation

@tleonhardt
Copy link
Member

@tleonhardt tleonhardt commented Dec 7, 2025

The cmd2.Cmd class no longer inherits from cmd.Cmd and the cmd2 module no longer depends on Python's built-in cmd module.

To make this happen we had to do the following:

  • Add an extra parameter to cmd2.Cmd.__init__ and several extra initializations within it
  • Add implementation for the completedefault and completenames methods
  • Eliminate some redundant casts to fix mypy warnings

The cmd2.Cmd class no longer inhertis from cmd.Cmd
@tleonhardt tleonhardt self-assigned this Dec 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2025

🤖 Hi @tleonhardt, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.92%. Comparing base (35af636) to head (c05a16d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1539      +/-   ##
==========================================
- Coverage   98.94%   98.92%   -0.02%     
==========================================
  Files          21       21              
  Lines        4933     4942       +9     
==========================================
+ Hits         4881     4889       +8     
- Misses         52       53       +1     
Flag Coverage Δ
unittests 98.92% <100.00%> (-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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2025

🤖 I'm sorry @tleonhardt, but I was unable to process your request. Please see the logs for more details.

@tleonhardt tleonhardt added this to the 4.0.0 milestone Dec 7, 2025
@tleonhardt
Copy link
Member Author

It's complaining about code coverage and the reason I think is we aren't covering the line for the case where stdout is not None in the cmd2.Cmd.__init__.

@tleonhardt tleonhardt mentioned this pull request Dec 7, 2025
7 tasks
@tleonhardt tleonhardt merged commit 3e1ec82 into main Dec 11, 2025
27 of 29 checks passed
@tleonhardt tleonhardt deleted the remove-dependency-on-cmd branch December 11, 2025 17:25
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.

3 participants