[issue25297] max_help_position is not works in argparse library

2015-10-03 Thread paul j3
paul j3 added the comment: The unittest test_argparse.py has one related test class TestAddSubparsers def test_alias_help has a long enough subparser invocation (with aliases) to produce wrapping with the default 24 max position: commands: COMMAND

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3
paul j3 added the comment: There's a bug in the HelpFormatter.add_argument method. It does not take into account the extra indentation of subactions (sub parsers) when calculating self._action_max_length. The corrected method and a test case is in the attached file. class MyFormatter(argpars

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3
paul j3 added the comment: My testing shows that it's a problem with the subparsers listing. When regular arguments are long, 'max_help_position' works (within limits allowed by 'width'). -- ___ Python tracker _

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread Alexander
Alexander added the comment: Problem also described on http://stackoverflow.com/questions/3215/ -- ___ Python tracker ___ ___ Pyth

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread Alexander
New submission from Alexander: Hi colleagues I have the code (max_help_position is 2000): formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=2000) parser = argparse.ArgumentParser(formatter_class=formatter_class) subparsers = parser.add_subparsers(title="Commands", me