Skip to content
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

fix #45 #46

Merged
merged 4 commits into from
Mar 28, 2022
Merged

fix #45 #46

merged 4 commits into from
Mar 28, 2022

Conversation

taranlu-houzz
Copy link
Contributor

@taranlu-houzz taranlu-houzz commented Mar 18, 2022

Fixes #45. Not sure if there is more to be considered here, since I am not really familiar with the inner workings of click.

- This would always be false, which is why the secondary opt was not added to the opt_str
@ewels
Copy link
Owner

ewels commented Mar 19, 2022

Great stuff, thanks! I have a feeling I put the idx stuff in because there can be multiple pairs of these flags (you can define lots of alternatives for the same option) and we need to show the right one. But if this fixes the behaviour then I guess you've isolated where the bug is 👌🏻 I'll take a look ASAP.

Copy link
Owner

@ewels ewels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for this! I refactored slightly to use a try/except with the assumption that this is the kind of safety mechanism that I was aiming for when I originally wrote the code.

In my testing I couldn't get it to trigger so I'm not sure that it is needed, but I figure it doesn't hurt either.

@ewels ewels merged commit 231e868 into ewels:main Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Negative --no-* option variant not showing up
2 participants