Releases: hamdanal/rich-argparse
Version 0.7.0
Last release in the Beta stability policy.
What's Changed
- Change the default group name formatter to
str.title
by @hamdanal in #48
This renders better with long group names and follows the convention of popular CLI tools and programs.Note
If you test the output of your CLI verbatim and rely on the default behavior of rich_argparse, you will have to either setgroup_name_formatter
explicitly or update the group names in the tests to Title Case. - Add docstrings to help users in IDEs.
- Fix the license text in the project card on PyPI
Full Changelog: v0.6.0...v0.7.0
Version 0.6.0
Features
- Support type checking for users. Bundle type information in the wheel and sdist.
- PR #43
Fixes
- Fix annotations of class variables previously typed as instance variables.
- PR #43
Auto-generated release notes:
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #39
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #40
- Start testing with python 3.12 by @hamdanal in #41
- Start testing on MacOS by @hamdanal in #42
- Fix types and mark as typed by @flying-sheep in #43
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #44
- Run coverage also on tests, add python 3.12 classifier and other minor tweaks by @hamdanal in #45
New Contributors
- @flying-sheep made their first contribution in #43
Full Changelog: v0.5.0...v0.6.0
Version 0.5.0
What's Changed
- Add pre-commit.ci by @hamdanal in #32
- Use soft_wrap option instead of large fixed width by @hamdanal in #35
- Fix highlight regexes with same style regression by @hamdanal in #37
- Add option to colorize user defined usage by @hamdanal in #38
Note
This feature is not activated by default. To enable it, setRichHelpFormatter.usage_markup = True
.
This only concerns the custom usage message passed toArgumentParser
, the usage generated by argparse automatically will always be colored.
See https://github.com/hamdanal/rich-argparse/blob/main/CHANGELOG.md
Full Changelog: v0.4.0...v0.5.0
Version 0.4.0
What's Changed
Added support for all help formatters of argparse by @hamdanal in #31
There are now five formatter classes defined in rich_argparse
RichHelpFormatter: the equivalent of argparse.HelpFormatter
RawDescriptionRichHelpFormatter: the equivalent of argparse.RawDescriptionHelpFormatter
RawTextRichHelpFormatter: the equivalent of argparse.RawTextHelpFormatter
ArgumentDefaultsRichHelpFormatter: the equivalent of argparse.ArgumentDefaultsHelpFormatter
MetavarTypeRichHelpFormatter: the equivalent of argparse.MetavarTypeHelpFormatter
Warning
This changes the default behavior ofRichHelpFormatter
to no longer respect line breaks in the description and help text. It now behaves similarly to the originalargparse.HelpFormatter
. You have now to use the appropriate formatter subclass to control line breaks as you would do with argparse formatters.
Full Changelog: v0.3.1...v0.4.0
Version 0.3.1
What's Changed
- Add a contributing guideline by @hamdanal in #29
- Fix required options not colored in usage by @hamdanal in #30
Full Changelog: v0.3.0...v0.3.1
Version 0.3.0
What's Changed
Features
Fixes
- Fix inconsistent coloring of args in the top usage panel
- Fix incorrect line breaks that put metavars on a alone on a new line
- Do not print help output, return it instead
Changes
- The default styles have been changed to be more in line with the new usage coloring
- PR #17
- The default
max_help_position
is now set to 24 (the default used in argparse) as line breaks
are no longer an issue- PR #20
Removed
- The
RichHelpFormatter.renderables
property has been removed, it was never documented- PR #20
Tests
- Run windows tests in CI
- PR #22
Full Changelog: v0.2.1...v0.3.0
Version 0.2.1
What's Changed
- Fix integration with
argparse.ArgumentDefaultsHelpFormatter
by @hamdanal in #14 - Test integration with other help formatters by @hamdanal in #15
Full Changelog: v0.2.0...v0.2.1
Version 0.2.0
What's Changed
Features
Fixes
- Add missing
:
after the group name similar to the original HelpFormatter - Fix padding of long options or metavars
- PR #11
- Fix overflow of text in help that was truncated
- PR #11
- Escape parameters that get substituted with
%
such as%(prog)s
and%(default)s
- PR #11
- Fix flaky wrapping of long lines
- PR #11
Full Changelog: v0.1.1...v0.2.0
Version 0.1.1
What's Changed
- Fix
%(prog)s
not replaced in text by @hamdanal in #6 - Do not print an extra newline at the end by @hamdanal in #8
Full Changelog: v0.1.0...v0.1.1
Version 0.1.0
First release. Now can install with pip install rich-argparse
.