Closed dwreeves closed 11 months ago
I'm likely going to keep this open for a while. I want to get down a sensible and flexible system for resolving the config, aimed at:
And I'd rather do too few changes and too few API guarantees than too many.
Also, see #134.
I think I am starting to settle on this configuration logic. I think it makes sense and is the least bad / least "astonishing" of all other alternatives. https://github.com/ewels/rich-click/issues/134#issuecomment-1872386532
Main changes:
@rich_config(help_config=...)
.RichHelpConfiguration()
at the top, and each sub-command may have a tiny tweak. That makes sense!Misc. changes:
Type[RichCommand]
, and this typing is covariant, so it cannot ever return a super-type. The should can be safely updated to return that.RichCommand.help_config
. It didn't feel like this made sense back in 1.7, now it feels less like this makes sense, since rich help configs should be resolved in the context level (since they need to inherit from their parents).stacklevel=2
s to the deprecation warnings.