Rich-argparse

Latest version: v1.5.2

Safety actively analyzes 666166 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

0.4.0

Features
- [PR-31](https://github.com/hamdanal/rich-argparse/pull/31)
Add support for all help formatters of argparse. Now there are 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

Note that this changes the default behavior of `RichHelpFormatter` to no longer respect line
breaks in the description and help text. It now behaves similarly to the original
`HelpFormatter`. You have now to use the appropriate subclass for this to happen.

0.3.1

Fixes
- [GH-28](https://github.com/hamdanal/rich-argparse/issues/28),
[PR-30](https://github.com/hamdanal/rich-argparse/pull/30)
Fix required options not coloured in the usage

0.3.0

Features
- [GH-16](https://github.com/hamdanal/rich-argparse/issues/16),
[PR-17](https://github.com/hamdanal/rich-argparse/pull/17)
A new custom usage lexer that is consistent with the formatter styles

Fixes
- [GH-16](https://github.com/hamdanal/rich-argparse/issues/16),
[PR-17](https://github.com/hamdanal/rich-argparse/pull/17)
Fix inconsistent coloring of args in the top usage panel
- [GH-12](https://github.com/hamdanal/rich-argparse/issues/12),
[PR-20](https://github.com/hamdanal/rich-argparse/pull/20)
Fix incorrect line breaks that put metavars on a alone on a new line
- [GH-19](https://github.com/hamdanal/rich-argparse/issues/19),
[PR-21](https://github.com/hamdanal/rich-argparse/pull/21)
Do not print help output, return it instead

Changes
- [PR-17](https://github.com/hamdanal/rich-argparse/pull/17)
The default styles have been changed to be more in line with the new usage coloring
- [PR-20](https://github.com/hamdanal/rich-argparse/pull/20)
The default `max_help_position` is now set to 24 (the default used in argparse) as line breaks
are no longer an issue


Removed
- [PR-20](https://github.com/hamdanal/rich-argparse/pull/20)
The `RichHelpFormatter.renderables` property has been removed, it was never documented

Tests
- [PR-22](https://github.com/hamdanal/rich-argparse/pull/22)
Run windows tests in CI

0.2.1

Fixes
- [GH-13](https://github.com/hamdanal/rich-argparse/issues/13),
[PR-14](https://github.com/hamdanal/rich-argparse/pull/14)
Fix compatibility with `argparse.ArgumentDefaultsHelpFormatter`

0.2.0

Features
- [GH-4](https://github.com/hamdanal/rich-argparse/issues/4),
[PR-9](https://github.com/hamdanal/rich-argparse/pull/9)
Metavars now have their own style `argparse.metavar` which defaults to `'bold cyan'`

Fixes
- [GH-4](https://github.com/hamdanal/rich-argparse/issues/4),
[PR-10](https://github.com/hamdanal/rich-argparse/pull/10)
Add missing ":" after the group name similar to the default HelpFormatter
- [PR-11](https://github.com/hamdanal/rich-argparse/pull/11)
Fix padding of long options or metavars
- [PR-11](https://github.com/hamdanal/rich-argparse/pull/11)
Fix overflow of text in help that was truncated
- [PR-11](https://github.com/hamdanal/rich-argparse/pull/11)
Escape parameters that get substituted with % such as %(prog)s and %(default)s
- [PR-11](https://github.com/hamdanal/rich-argparse/pull/11)
Fix flaky wrapping of long lines

0.1.1

Fixes
- [GH-5](https://github.com/hamdanal/rich-argparse/issues/5),
[PR-6](https://github.com/hamdanal/rich-argparse/pull/6)
Fix `RichHelpFormatter` does not replace `%(prog)s` in text
- [GH-7](https://github.com/hamdanal/rich-argparse/issues/7),
[PR-8](https://github.com/hamdanal/rich-argparse/pull/8)
Fix extra newline at the end

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.