Skip to content

Commit

Permalink
update changelog and dep warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dwreeves committed Dec 29, 2023
1 parent 81dc0f1 commit c4b6ea1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

## Version 1.8.0dev

- Some internal refactors:
- 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.

## Version 1.7.1

Expand Down
2 changes: 1 addition & 1 deletion src/rich_click/rich_help_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def __post_init__(self) -> None: # noqa: D105
"`highlighter` kwarg is deprecated in RichHelpConfiguration."
" Please do one of the following instead: either set highlighter_patterns=[...] if you want"
" to use regex; or for more advanced use cases where you'd like to use a different type"
" of rich.highlighter.Highlighter, subclass the RichContext instead.",
" of rich.highlighter.Highlighter, subclass the `RichHelpFormatter` and update its `highlighter`.",
DeprecationWarning,
stacklevel=2,
)
Expand Down

0 comments on commit c4b6ea1

Please sign in to comment.