summaryrefslogtreecommitdiff
path: root/cmd2/argparse_completer.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-08-24 11:10:03 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-08-24 11:10:03 -0400
commitd953fb28d9afc82098512b0bd5f99104a9c193b8 (patch)
tree82bb7dbd87c4b8d9ebcbb7f1452795945d68ad5f /cmd2/argparse_completer.py
parent0ad6b6d5417d0d126dc39550d5416f266cc47ec5 (diff)
downloadcmd2-git-d953fb28d9afc82098512b0bd5f99104a9c193b8.tar.gz
ACHelpFormatter now inherits from argparse.RawTextHelpFormatter to make it easier to format help/description text
Diffstat (limited to 'cmd2/argparse_completer.py')
-rwxr-xr-xcmd2/argparse_completer.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py
index 1479a6bf..0e241cd9 100755
--- a/cmd2/argparse_completer.py
+++ b/cmd2/argparse_completer.py
@@ -695,7 +695,7 @@ class AutoCompleter(object):
# noinspection PyCompatibility,PyShadowingBuiltins,PyShadowingBuiltins
-class ACHelpFormatter(argparse.HelpFormatter):
+class ACHelpFormatter(argparse.RawTextHelpFormatter):
"""Custom help formatter to configure ordering of help text"""
def _format_usage(self, usage, actions, groups, prefix) -> str:
@@ -870,9 +870,6 @@ class ACHelpFormatter(argparse.HelpFormatter):
result = super()._format_args(action, default_metavar)
return result
- def _split_lines(self, text: str, width) -> List[str]:
- return text.splitlines()
-
# noinspection PyCompatibility
class ACArgumentParser(argparse.ArgumentParser):