-
Notifications
You must be signed in to change notification settings - Fork 2
Added handling hidden parameter in commands. #9
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
click_command_tree.py
Outdated
@@ -30,7 +30,8 @@ def _build_command_tree(click_command): | |||
|
|||
if isinstance(click_command, click.core.Group): | |||
for _, cmd in click_command.commands.items(): | |||
wrapper.children.append(_build_command_tree(cmd)) | |||
if not cmd.hidden: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the hidden
attribute was added in v7, and I would like to keep this library as backwards compatible as possible. Could this also handle the case where this attribute is not there?
if not cmd.hidden: | |
if not getattr(cmd, "hidden", False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure,
the offered solution was just proof of concept. Thank you for reply
Hi, |
I will make some time this weekend to get this release out |
Perfektní, thanks
Dne čt 2. 3. 2023 18:39 uživatel Harrison Wright ***@***.***>
napsal:
… Hi, the last one question :-) Do you have any plan / schedule to update
the click-tree with this hidden commands and get it on pypi.org ? Thanks
:-)
I will make some time this weekend to get this release out
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABS2LTDT55LFHZVTVS7AOUDW2DLNBANCNFSM6AAAAAAVKNKPBQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@Gargy007 I released version 1.1.1 |
Hi,
thank you, I appreciate it.
Petr
pá 3. 3. 2023 v 15:07 odesílatel Harrison Wright ***@***.***>
napsal:
… @Gargy007 <https://github.com/Gargy007> I released version 1.1.1
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABS2LTHKLGSJ3BLAZOETLWTW2H3LFANCNFSM6AAAAAAVKNKPBQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Issue: #8
Just check that code if it's OK for you. Thank you