Releases: ewels/rich-click
Releases · ewels/rich-click
v1.8.0dev3
- Fixed issue where error messages would not print to
stderr
by default.
v1.8.0dev2
- World's most esoteric bug fixed.
v1.8.0dev1
- Bugfix to
rich_click.patch.patch()
behavior when running unpatchedRichGroup
s.
v1.8.0dev0
- Add
--rich-config
option to therich-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 torich_help_rendering.py
.RichCommand
now makes use of methods in the super class:format_usage
,format_help_text
,format_options
, andformat_epilog
.- Global
formatter
object has been removed from the code. highlighter
is now constructed by theRichHelpFormatter
rather than being inside the config object.
- Added
RichHelpConfiguration.load_from_globals()
classmethod, which pulls all configuration fromrich_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 inRichHelpConfiguration
; please usehighlighter_patterns
instead.
- Related:
- Moved exclusively to
pyproject.toml
and removedsetup.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
v1.7.3
v1.7.2
v1.7.1
v1.7.0
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 supportedcontext_settings
argument provided by theCommand
andGroup
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 theRichHelpConfiguration
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
andRichHelpConfiguration
properties. - Added contributor VSCode settings
This PR closes a number of issues:
- #25: Add tests!
- #90:
click.ClickException
should output tostderr
- #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 toMAX_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
More bugfixes to 1.7.0.