Skip to content

v1.7.0

Compare
Choose a tag to compare
@dwreeves dwreeves released this 11 Oct 11:30
· 137 commits to main since this release

Warning

Click 7.x support is deprecated and will be removed in rich-click version 1.8.x.
Please update to a newer version of click.

This release comes after merging a huge pull-request from @BrutalSimplicity - see #92

  • Extends Click's HelpFormatter class
  • Creates a HelpConfiguration class that doubles the current module-level settings
  • Added a decorator that allows the HelpConfiguration to be passed into Click via the supported context_settings argument provided by the Command and Group classes.
  • The Rich Console object can also be configured per command and is distinct from the Console instance used internally by the formatter. The RichHelpFormatter creates a console based on the RichHelpConfiguration as the tight coupling between the Formatter and Click's internals make it difficult to allow the Console to be configured externally (i.e. one example is that Click expects help formatting to be buffered).
  • Created a RichContext class to allow creation of the custom formatter.
  • The Rich Command, Group, and Context now expose the Console and RichHelpConfiguration properties.
  • Added contributor VSCode settings

This PR closes a number of issues:

  • #25: Add tests!
  • #90: click.ClickException should output to stderr
  • #88: Rich Click breaks contract of Click's format_help and its callers
  • #18: Options inherited from context settings aren't applied

In addition, we merged another large pull-request that adds full static type-checking support (see issue #85), and fixes many bugs - see PR #126.

In addition:

  • Add new style option STYLE_COMMAND [#102]
  • Add new style option WIDTH (in addition to MAX_WIDTH), thanks to @ealap [#110]
  • Add new style option STYLE_ERRORS_SUGGESTION_COMMAND [#136]
  • Updated styling for Usage: line to avoid off-target effects [#108]
  • Click 7.x support has been deprecated. [#117]
  • Fixed error where ctx.exit(exit_code) would not show nonzero exit codes.[#114]
  • Support click.MultiCommand. [#38]: