Skip to content

[rich_utils] added Paragraph Help Formatters based on rich_argparse classes#1656

Closed
neoniobium wants to merge 3 commits intopython-cmd2:mainfrom
neoniobium:rich-argparse
Closed

[rich_utils] added Paragraph Help Formatters based on rich_argparse classes#1656
neoniobium wants to merge 3 commits intopython-cmd2:mainfrom
neoniobium:rich-argparse

Conversation

@neoniobium
Copy link
Copy Markdown

@neoniobium neoniobium commented May 6, 2026

This PR added two new argparse Formatter classes based on the equivalent classes in the rich_argparse package.

Since the ExtendedParagraphRichHelpFormatter was added in rich_argparse version 1.8.0 also bump the minimum version to 1.8.0.

Reference:

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (5e2b4ac) to head (87666e9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1656      +/-   ##
==========================================
+ Coverage   99.50%   99.52%   +0.02%     
==========================================
  Files          21       21              
  Lines        4813     4816       +3     
==========================================
+ Hits         4789     4793       +4     
+ Misses         24       23       -1     
Flag Coverage Δ
unittests 99.52% <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.

@kmvanbrunt
Copy link
Copy Markdown
Member

Thanks for the PR, but I purposely don't include the non-standard help formatters from rich-argparse. As that list grows, I don't want the maintenance and support burden to keep track of them. If a cmd2 developer wants to use them in their application, it's trivial.

class ParagraphCmd2HelpFormatter(
    ParagraphRichHelpFormatter,
    Cmd2HelpFormatter,
):

@kmvanbrunt kmvanbrunt closed this May 6, 2026
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