[Solo] fix "colorful" argparse module. Make it work with longer strings

This commit is contained in:
Fabio Erculiani
2012-09-25 16:12:03 +02:00
parent 594bff9630
commit 5936056a4c
+2 -2
View File
@@ -50,10 +50,10 @@ class ColorfulFormatter(argparse.RawTextHelpFormatter):
# long action name; start on the next line
else:
tup = self._current_indent, '', action_header
tup = self._current_indent, '', action_width, action_header
tup_str = '%*s%-*s ' % tup
action_header = self.__colors(tup_str, orig_action_header)
indent_first = help_position
indent_first = 0
# collect the pieces of the action help
parts = [action_header]