Define `feud.click.is_rich` to check if `rich_click` is installed
eonu opened this issue · comments
Edwin (Ed) Onuonga commented
Does this suggestion already exist?
- This is a new feature!
Feature description
There is currently no easy way to check whether rich_click
is installed and being used.
A simple way to do this is to change:
Lines 8 to 11 in e196e2a
To:
#: Whether ``rich_click`` is installed or not.
is_rich: bool
try:
from rich_click import *
is_rich = True
except ImportError:
from click import *
is_rich = False
Then feud.click.is_rich
can be used within the code base or by the user.
Existing parts of the code base relying on similar checks should be updated to re-use this variable.
Edwin (Ed) Onuonga commented
Fixed in #132.