v1.8.0dev0
Pre-release
Pre-release
- Add
--rich-configoption to therich-clickCLI. - 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.pyis exclusively the global config; all formatting has been moved torich_help_rendering.py.RichCommandnow makes use of methods in the super class:format_usage,format_help_text,format_options, andformat_epilog.- Global
formatterobject has been removed from the code. highlighteris now constructed by theRichHelpFormatterrather 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:
highlighteris now deprecated inRichHelpConfiguration; please usehighlighter_patternsinstead.
- Related:
- Moved exclusively to
pyproject.tomland 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.