From 612013b0a0e2c9d16490aed3252e8e760974bc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Krassowski?= <5832902+krassowski@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:46:47 +0100 Subject: [PATCH] Do not add `-h` to the help command itself Co-authored-by: david qiu --- packages/jupyter-ai/jupyter_ai/chat_handlers/base.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py b/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py index 02203fb24..f386420a1 100644 --- a/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py +++ b/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py @@ -116,9 +116,10 @@ def __init__( add_help=False, description=self.help, formatter_class=MarkdownHelpFormatter ) # the default help would exit; instead implement a custom help - self.parser.add_argument( - "-h", "--help", action="store_true", help="show this help message" - ) + if not self.__class__.id == "help": + self.parser.add_argument( + "-h", "--help", action="store_true", help="show this help message" + ) self.root_dir = os.path.abspath(os.path.expanduser(root_dir)) self.dask_client_future = dask_client_future self.llm = None