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.

Author sobolevn
Recipients longendu, sobolevn
Date 2021-09-25.07:43:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632555785.87.0.145021528065.issue45275@roundup.psfhosted.org>
In-reply-to
Content
Hi!

From your description it is not clear how exactly you create your subcommand.

From my experience, it works. Demo:

```
import argparse

parser = argparse.ArgumentParser(description='Process some integers.')
subparsers = parser.add_subparsers()

# create the parser for the "a" command
parser_a = subparsers.add_parser('a', help='a help', description='test me')
parser_a.add_argument('bar', type=int, help='bar help')

print(parser.parse_args())
```

Here's the output of `python script.py a -h`:

```
usage: ex.py a [-h] bar

test me

positional arguments:
  bar         bar help

options:
  -h, --help  show this help message and exit
```

Do you have the same setup? Or is there anything else that needs to be fixed?
History
Date User Action Args
2021-09-25 07:43:05sobolevnsetrecipients: + sobolevn, longendu
2021-09-25 07:43:05sobolevnsetmessageid: <1632555785.87.0.145021528065.issue45275@roundup.psfhosted.org>
2021-09-25 07:43:05sobolevnlinkissue45275 messages
2021-09-25 07:43:05sobolevncreate