Skip to content

Releases: hamdanal/rich-argparse

Version 1.7.0

08 Feb 19:13
Compare
Choose a tag to compare

This is the last release to support Python 3.8

Introducing auto-rich-argparse 🚀

Improve the help output of your favorite argparse command line tool by simply installing auto-rich-argparse in its environment. Try it out with your favorite tool using:

uvx --with auto-rich-argparse <YOUR_FAVORITE_TOOL> --help

Read more at https://github.com/hamdanal/auto-rich-argparse.

Incoming Change in Version 2.0

In rich-argparse 2.0, rich markup will become opt in instead of opt out. This means usages like this:

parser.add_argument("--foo", help="[red]This text is in red[/]")

Will need to set the option RichHelpFormatter.help_markup = True to work as expected. Please see #151 for context and to give feedback.

What's Changed

This release adds new features and fixes a few bugs.

Features

Fixes

  • Fix ValueError when using %(default)s inside square brackets and help_markup is enabled. Contributed in #153 and #154
  • Do not highlight --options inside backticks. Contributed in #142

Other Changes

New Contributors

  • @mr-c made their first contribution in #139

Full Changelog: v1.6.0...v1.7.0

Version 1.6.0

02 Nov 10:41
Compare
Choose a tag to compare

What's Changed

  • Improved way to create metavars coloured strings by @atteggiani in #128
  • Do not wrap long group titles by @hamdanal in #131
  • [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #132
  • Fix help preview generation with newer releases of rich by @hamdanal in #135
  • Update RichHelpFormatter.add_text() type hint to reflect its ability to take a Rich renderable. by @kmvanbrunt in #134

New Contributors

Full Changelog: v1.5.2...v1.6.0

Version 1.5.2

15 Jun 15:46
Compare
Choose a tag to compare

Fix a regression in version 1.5.1 in the handling of %(default)s style. The regression crashed the formatter in certain situations when %(default)s comes after a markup text.

What's Changed

Full Changelog: v1.5.1...v1.5.2

Version 1.5.1

06 Jun 18:18
Compare
Choose a tag to compare

What's Changed

  • Fix %(default)s style when help markup is deactivated by @hamdanal in #123

Full Changelog: v1.5.0...v1.5.1

Version 1.5.0

01 Jun 13:11
Compare
Choose a tag to compare

Highlights of the release

  • PR-103 Python 3.13 is now officially supported
  • GH-95, PR-103 Python 3.7 is no longer supported (EOL since 27/6/2023)
  • GH-120, GH-121, PR-122 Add options help_markup and text_markup to disable console markup in the help text and the description text respectively.
  • GH-115, PR-116 Do not print group names suppressed with argparse.SUPPRESS

What's Changed

New Contributors

Full Changelog: v1.4.0...v1.5.0

Version 1.4.0

21 Oct 17:49
Compare
Choose a tag to compare

Highlights of the release

  • Add HelpPreviewAction to generate a preview of the help output in SVG, HTML, or TXT formats.
  • Allow arbitrary renderables like Markdown and Table in the descriptions and epilog.

What's Changed

  • Update pre-commit and github actions by @hamdanal in #89
  • Make RichHelpFormatter itself renderable with rich by @hamdanal in #90
  • Allow passing a custom console to the formatter by @hamdanal in #92
  • [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #94
  • Add action to generate SVG, HTML, or TXT help preview by @hamdanal in #93
  • Add links to the changelog by @hamdanal in #96
  • Avoid importing typing to improve startup time 35% by @hamdanal in #97
  • Add a style for default values when using %(default)s by @hamdanal in #98
  • Allow arbitrary renderables in the descriptions and epilog by @hamdanal in #99
  • Fix color of brackets surrounding positional arguments in the usage by @hamdanal in #101

Full Changelog: v1.3.0...v1.4.0

Version 1.3.0

19 Aug 18:58
Compare
Choose a tag to compare

Highlights of the release

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.3.0

Version 1.2.0

02 Jul 10:28
Compare
Choose a tag to compare

Highlights of the release

Experimental support for optparse help formatters.
See https://github.com/hamdanal/rich-argparse#optparse-support for more.

What's Changed

Full Changelog: v1.1.1...v1.2.0

Version 1.1.1

30 May 20:04
Compare
Choose a tag to compare

What's Changed

  • Add test for format specifier compatibility by @hamdanal in #65
  • Do not import rich when the formatter is initialized by @hamdanal in #68
  • Fix escaping of % symbol by @hamdanal in #69

Full Changelog: v1.1.0...v1.1.1

Version 1.1.0

11 Mar 12:04
Compare
Choose a tag to compare

Highlights of the release

New style argparse.prog for the program name placeholder %(prog)s in the usage.

What's Changed

New Contributors

Full Changelog: v1.0.0...v1.1.0