]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/log
ceph-deploy.git
10 years ago[RM-12151] Redo mon sub command help text
Travis Rhoden [Mon, 29 Jun 2015 21:41:27 +0000 (14:41 -0700)]
[RM-12151] Redo mon sub command help text

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Add new 'ToggleRawTextHelpFormatter'
Travis Rhoden [Mon, 29 Jun 2015 21:32:55 +0000 (14:32 -0700)]
[RM-12151] Add new 'ToggleRawTextHelpFormatter'

The existing use of argparse.RawDescriptionHelpFormatter seems to stem
from wanting to use newlines in argparse help output.  To use the raw
text formatter, you have to provide a static string that is always
output with --help.

The problem is that the defintion of this help string is pretty
disconnected from the rest of the code. You are documenting options many
lines away from where they are defined instead of normally being at the
same time.

To solve this, introduce a new ToggleRawTextHelpFormatter that allows
for the optional use of Raw text on any individual help item by
prefixing it with 'R|'.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>