ewels / rich-click

Format click help output nicely with rich.
https://ewels.github.io/rich-click/
MIT License
628 stars 37 forks source link

fix errors in rc cli tool #128

Closed dwreeves closed 1 year ago

dwreeves commented 1 year ago

In 1.7.0dev0, I ended up introducing some bugs in the rich-click CLI tool. The issue was by patching the click module, some things like isinstance(obj, click.MultiCommand) checks don't work.

The trick is instead of doingimport click and using click.MultiCommand, instead do from click import MultiCommand and use MultiCommand. This keeps that object from being patched with the rich-click CLI.