Skip to content

Commit

Permalink
Handle click groups in click helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablyFaiz committed Jul 16, 2024
1 parent 75db69c commit 519b81a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rl/utils/click.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,18 @@ def decorator(f):
return decorator


def group(*args, **kwargs):
context_settings = kwargs.get("context_settings", {})
if "show_default" not in context_settings:
context_settings["show_default"] = True
kwargs["context_settings"] = context_settings

def decorator(f):
sys.excepthook = excepthook
return rich_click.group(*args, **kwargs)(f)

return decorator


def __getattr__(name):
return getattr(rich_click, name)

0 comments on commit 519b81a

Please sign in to comment.