[issue21633] Argparse does not propagate HelpFormatter class to subparsers

2021-05-27 Thread Irit Katriel
Irit Katriel added the comment: What Paul explained is also covered in the documentation here: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers -- nosy: +iritkatriel resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue21633] Argparse does not propagate HelpFormatter class to subparsers

2014-06-02 Thread paul j3
paul j3 added the comment: You can specify the 'formatter_class' when creating each subparser: sp1=sp.add_parser('cmd1', formatter_class = argparse.RawDescriptionHelpFormatter) The 'add_parser' command is the one that passes a variety of **kwargs to 'ArgumentParser' (or what ever parser c

[issue21633] Argparse does not propagate HelpFormatter class to subparsers

2014-06-01 Thread Michael Cohen
New submission from Michael Cohen: Argparse has an option to set the custom help formatter class as a kwarg. For example one can define: class MyHelpFormatter(argparse.RawDescriptionHelpFormatter): def add_argument(self, action): if action.dest != "SUPPRESS": super(Reka