-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add context_settings support #115
add context_settings support #115
Conversation
d8a6529
to
7c6f01b
Compare
7c6f01b
to
c61797b
Compare
OK, that took a few attempts to get the CI passing, but it's ready! 😄 @ewels |
@ewels This is going to conflict a little bit with the other PR because this one is using the (deprecated!!!!) distutils package (which will be removed in Python 3.12!!!), and the other one is using the suggested |
Ah right, sorry! But yeah, I think as you say it's good to switch over anyway. |
4047d5f
to
616054d
Compare
Some changes to the code between July and now:
Of course, the main point of this PR is to address #18, which we do! It is just entwined in the version compatibility stuff due to how Click 7.x, 8.0, and 8.1+ all parse things differently than one another. |
Overview
The issue suggests there may be more issues with
context_settings
options not being passed into Rich-Click properly, but as far as I can tell, the only outstanding issue withcontext_settings
was theshow_default
option.Behaviors of each Click version
When it comes to handling defaults using
context_settings={"show_default": True}
, each supported minor version of click, 7, 8.0, and 8.1, behaves differently.In the below sub-sections, I catalog each behavior of each version of Click and show that my changes to Rich-Click adhere to the behaviors of the base Click versions.
Click 7.x
Original Click behavior
Rich-Click behavior
Click 8.0
Original Click behavior
Rich-Click behavior
Click 8.1
Original Click behavior
Rich-Click behavior