Skip to content

Releases: hamdanal/rich-argparse

Version 0.7.0

31 Dec 22:53
Compare
Choose a tag to compare

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 set group_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

18 Dec 10:27
Compare
Choose a tag to compare

Features

  • Support type checking for users. Bundle type information in the wheel and sdist.

Fixes

  • Fix annotations of class variables previously typed as instance variables.

Auto-generated release notes:

What's Changed

New Contributors

Full Changelog: v0.5.0...v0.6.0

Version 0.5.0

05 Nov 15:13
Compare
Choose a tag to compare

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, set RichHelpFormatter.usage_markup = True.
    This only concerns the custom usage message passed to ArgumentParser, 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

15 Oct 15:46
Compare
Choose a tag to compare

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 of RichHelpFormatter to no longer respect line breaks in the description and help text. It now behaves similarly to the original argparse.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

08 Oct 12:29
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.0...v0.3.1

Version 0.3.0

01 Oct 10:46
Compare
Choose a tag to compare

What's Changed

Features

  • A new custom usage lexer that is consistent with the formatter styles

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
  • The default max_help_position is now set to 24 (the default used in argparse) as line breaks
    are no longer an issue

Removed

  • The RichHelpFormatter.renderables property has been removed, it was never documented

Tests

  • Run windows tests in CI

Full Changelog: v0.2.1...v0.3.0

Version 0.2.1

25 Sep 12:03
Compare
Choose a tag to compare

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

17 Sep 19:39
Compare
Choose a tag to compare

What's Changed

Features

  • Metavars now have their own style argparse.metavar which defaults to 'bold cyan'

Fixes

  • Add missing : after the group name similar to the original HelpFormatter
  • Fix padding of long options or metavars
  • Fix overflow of text in help that was truncated
  • Escape parameters that get substituted with % such as %(prog)s and %(default)s
  • Fix flaky wrapping of long lines

Full Changelog: v0.1.1...v0.2.0

Version 0.1.1

10 Sep 08:11
Compare
Choose a tag to compare

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

03 Sep 15:03
37e8496
Compare
Choose a tag to compare

First release. Now can install with pip install rich-argparse.