Skip to content

Releases: ewels/rich-click

v1.8.0dev1

09 Apr 13:12
Compare
Choose a tag to compare
v1.8.0dev1 Pre-release
Pre-release
  • Bugfix to rich_click.patch.patch() behavior when running unpatched RichGroups.

v1.8.0dev0

09 Apr 11:19
52e1e2d
Compare
Choose a tag to compare
v1.8.0dev0 Pre-release
Pre-release
  • Add --rich-config option to the rich-click CLI.
  • Better typing for option groups and command groups with TypedDict [#156]
  • Lazy load Rich to reduce overhead when not rendering help text. [#154]
  • Some internal refactors. These refactors are aimed at making the abstractions more maintainable over time, more consistent, and more adept for advanced used cases.
    • rich_click.py is exclusively the global config; all formatting has been moved to rich_help_rendering.py.
    • RichCommand now makes use of methods in the super class: format_usage, format_help_text, format_options, and format_epilog.
    • Global formatter object has been removed from the code.
    • highlighter is now constructed by the RichHelpFormatter rather than being inside the config object.
  • Added RichHelpConfiguration.load_from_globals() classmethod, which pulls all configuration from rich_click.py.
  • Fix bug with regex highlighter for options and switches.
  • RichHelpConfiguration() is now asserted to be JSON serializable, as an option for porting configurations. That said, serialization is not a fully supported feature of the high-level API, so serialize the config at your own risk.
    • Related: highlighter is now deprecated in RichHelpConfiguration; please use highlighter_patterns instead.
  • Moved exclusively to pyproject.toml and removed setup.py / setup.cfg; thank you @Stealthii!
  • Moved to text_markup: Literal["markdown", "rich", None] instead of booleans.
  • Fixed bug where CLI errors did not output to stderr.

v1.7.4

12 Mar 04:36
Compare
Choose a tag to compare
  • Set legacy_windows by default to None.

v1.7.3

05 Jan 15:54
7d40b91
Compare
Choose a tag to compare
  • Fix false deprecation warning.

v1.7.2

02 Dec 23:14
Compare
Choose a tag to compare
  • Add support for rich formatting in epilog text [#146]

v1.7.1

01 Nov 00:39
Compare
Choose a tag to compare
  • Fix bug with rich-click CLI not working with Python 3.12. #141
  • Fix compatibility issue with dbt-core CLI. [#140]

v1.7.0

11 Oct 11:30
Compare
Choose a tag to compare

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]:

v1.7.0dev1

07 Oct 19:16
Compare
Choose a tag to compare
v1.7.0dev1 Pre-release
Pre-release

More bugfixes to 1.7.0.

1.7.0dev

07 Oct 00:30
Compare
Choose a tag to compare
1.7.0dev Pre-release
Pre-release

Development prerelease of 1.7.0. (Full changelog will be included in full release.)

v1.6.1

19 Jan 06:05
dd63c46
Compare
Choose a tag to compare

Full Changelog: v1.6.0...v1.6.1