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.
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.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on rich-click to permit the latest version.
Release notes
Sourced from rich-click's releases.
Changelog
Sourced from rich-click's changelog.
... (truncated)
Commits
64cf966
Merge pull request #193 from dwreeves/one-last-change30af6dc
move from dev to actual679cfed
update06a8bc1
remove redundant 'record' boolb0177ae
Merge pull request #184 from ewels/blog43070d2
remove localhost from testing588ae4b
more-updates2c29f8a
more updates87017fd
Merge pull request #190 from dwreeves/blog-updates28a6468
Merge branch 'blog' of github.com-dwreeves:ewels/rich-click into blog-updatesDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show