Skip to content

Commit

Permalink
Merge pull request #46 from taranlu-houzz/negative_option_issue
Browse files Browse the repository at this point in the history
fix #45
  • Loading branch information
ewels authored Mar 28, 2022
2 parents 56ac360 + d36fd0a commit 231e868
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Monkey-patch `RichCommand` and `RichGroup` in CLI code for better `rich-click` compatability with more tools [[#43](https://github.com/ewels/rich-click/pull/43)]
- Parse emoji shortcodes `:partying_face:` [[#51](https://github.com/ewels/rich-click/pull/51)]
- Pushed minimum version of Python up to 3.7, in line with [Click v8.1](https://click.palletsprojects.com/en/8.1.x/changes/#version-8-1-0)
- Fixed bug where `--no-myflag` wasn't showing in the help [[#45](https://github.com/ewels/rich-click/issues/45)]

## Version 1.2.1 (2022-03-02)

Expand Down
4 changes: 3 additions & 1 deletion src/rich_click/rich_click.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,10 @@ def rich_format_help(
opt_short_strs = []
for idx, opt in enumerate(param.opts):
opt_str = opt
if param.secondary_opts and idx in param.secondary_opts:
try:
opt_str += "/" + param.secondary_opts[idx]
except IndexError:
pass
if "--" in opt:
opt_long_strs.append(opt_str)
else:
Expand Down

0 comments on commit 231e868

Please # to comment.