Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Remove dependency on Python's built-in cmd module#1539

Merged
tleonhardt merged 6 commits intomain from
remove-dependency-on-cmd
Dec 11, 2025
Merged

Remove dependency on Python's built-in cmd module #1539
tleonhardt merged 6 commits intomain from
remove-dependency-on-cmd

Conversation

@tleonhardt
Copy link
Member

@tleonhardt tleonhardt commented Dec 7, 2025
edited
Loading

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
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.

Copy link

codecov bot commented Dec 7, 2025
edited
Loading

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.

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
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
17 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

Reviewers

@kmvanbrunt kmvanbrunt kmvanbrunt requested changes

Labels

None yet

Projects

None yet

Milestone

4.0.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /