Added cmd2.Cmd.ppretty() pretty print output method#1433
Merged
tleonhardt merged 3 commits intomasterfrom May 26, 2025
Merged
Conversation
This method provides a way to pretty-print arbitrary Python structures similar to the pprint.pprint method in the standard library.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1433 +/- ##
=======================================
Coverage 98.56% 98.56%
=======================================
Files 20 20
Lines 5723 5726 +3
=======================================
+ Hits 5641 5644 +3
Misses 82 82
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Added
cmd2.Cmd.ppretty()pretty print output method.This method provides a way to pretty-print arbitrary Python structures similar to the pprint.pprint method in the standard library.
Closes #1416
As part of this PR I also managed to finally clean up the old broken checks from ancient use of AppVeyor and Travis-CI. This required using the GitHub API with a personal access token to send fake "success" statuses for each of these tools for the SHA associated with the last commit in this PR. So finally our PRs properly show
All checks have passedlike they should! For posterity because it took me freaking forever to figure out how to do it, here is an example command usingcurl:Lastly, this is the first PR where our Codecov Report is properly showing up in a long time. That required generating a token, storing that in GitHub secrets for the repo, and in a separate PR modifying our GitHub Actions workflow to use that token when uploading coverage reports to
codecov.