diff options
Diffstat (limited to 'cmd2/argparse_custom.py')
-rw-r--r-- | cmd2/argparse_custom.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd2/argparse_custom.py b/cmd2/argparse_custom.py index 5d8e76ef..8da47461 100644 --- a/cmd2/argparse_custom.py +++ b/cmd2/argparse_custom.py @@ -1,14 +1,14 @@ # coding=utf-8 """ This module adds capabilities to argparse by patching a few of its functions. It also defines a parser -class called ArgParser which improves error and help output over normal argparse. All cmd2 code uses +class called Cmd2ArgumentParser which improves error and help output over normal argparse. All cmd2 code uses this parser and it is recommended that developers of cmd2-based apps either use it or write their own parser that inherits from it. This will give a consistent look-and-feel between the help/error output of built-in cmd2 commands and the app-specific commands. -Since the new capabilities are added by patching at the argparse API level, they are available whether or -not ArgParser is used. However, the help and error output of ArgParser is customized to notate nargs ranges -whereas any other parser class won't be as explicit in their output. +Since the new capabilities are added by patching at the argparse API level, they are available whether or not +Cmd2ArgumentParser is used. However, the help and error output of Cmd2ArgumentParser is customized to notate +nargs ranges whereas any other parser class won't be as explicit in their output. ############################################################################################################ # Added capabilities @@ -634,7 +634,7 @@ class Cmd2HelpFormatter(argparse.RawTextHelpFormatter): # noinspection PyCompatibility -class ArgParser(argparse.ArgumentParser): +class Cmd2ArgumentParser(argparse.ArgumentParser): """Custom ArgumentParser class that improves error and help output""" def __init__(self, *args, **kwargs) -> None: |