You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add --rich-config and --output options to the rich-click CLI.
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", "ansi", None] instead of booleans.
The default is now ansi instead of None to help support usage of click.style(). None is still supported.
Fixed issue where error messages would not print to stderr by default.