This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: argparse subparser help indent too short
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: TakingItCasual, paul.j3
Priority: normal Keywords:

Created on 2018-09-18 16:49 by TakingItCasual, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg325663 - (view) Author: TakingItCasual (TakingItCasual) Date: 2018-09-18 16:49
The help is indented too early for subparsers with long argument names. I'm currently using the ProperIndentParser class from the following gist to create my top level parser, which fixes the issue:

https://gist.github.com/TakingItCasual/df40932dcc30012325bfed241bdaabd0
msg325665 - (view) Author: TakingItCasual (TakingItCasual) Date: 2018-09-18 17:03
More detailed explanation on the SO post I found the HelpFormatter class from:

https://stackoverflow.com/q/32888815/2868017
msg325808 - (view) Author: paul j3 (paul.j3) * (Python triager) Date: 2018-09-19 22:20
Looks like I had my say on this in the Stackoverflow link (3 yrs ago).
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 78905
2018-09-19 22:20:26paul.j3setnosy: + paul.j3
messages: + msg325808
2018-09-18 17:03:31TakingItCasualsetmessages: + msg325665
2018-09-18 16:49:27TakingItCasualcreate