Refactored cmd2 to better account for our use of Rich.#1477
Merged
kmvanbrunt merged 13 commits intomainfrom Aug 19, 2025
Merged
Refactored cmd2 to better account for our use of Rich.#1477kmvanbrunt merged 13 commits intomainfrom
kmvanbrunt merged 13 commits intomainfrom
Conversation
* Added string_utils.py which contains all string utility functions. This includes quoting and alignment functions from utils.py. This also includes style-related functions from ansi.py. * Added colors.py which contains all color names supported by Rich. * Added styles.py which contains the names of all cmd2-specific styles. * Moved string styling functionality from ansi.py to string_utils.py. * Removed all text style Enums from ansi.py since we use Rich. * Renamed ansi.py to terminal_utils.py to reflect the functions left in it. * Removed table_creation.py since we use Rich tables now.
…longer contains a StrEnum
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1477 +/- ##
=======================================
Coverage ? 98.50%
=======================================
Files ? 23
Lines ? 4884
Branches ? 0
=======================================
Hits ? 4811
Misses ? 73
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Closed
tleonhardt
requested changes
Aug 18, 2025
Member
tleonhardt
left a comment
There was a problem hiding this comment.
Overall looks really good. Just requesting some minor changes for ease of maintainability.
b414ec5 to
df0eb4a
Compare
df0eb4a to
24676aa
Compare
033ca31 to
dd76861
Compare
dd76861 to
4621211
Compare
tleonhardt
previously approved these changes
Aug 18, 2025
Member
tleonhardt
left a comment
There was a problem hiding this comment.
LGTM
In the future we'll need to spend some more time updating the documentation for all of these changes. But this looks good for now.
…tent with our other global settings.
tleonhardt
previously approved these changes
Aug 18, 2025
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.
Refactored cmd2 to better account for our use of Rich.