argparse: undocumented `nargs` constants `ONE_OR_MORE`, `OPTIONAL`, `PARSER`, `REMAINDER`, `ZERO_OR_MORE`, `SUPPRESS`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Concerning the possible values of the nargs parameter of add_argument().
The following values are already described in the documentation, so only a mention of the constants is needed:
OPTIONAL=?ZERO_OR_MORE=*ONE_OR_MORE=+
The following constants and their values do not seem to be documented anywhere:
PARSERREMAINDER
SUPPRESS constant was documented for help parameter in https://github.com/python/cpython/issues/53595, but not for nargs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the argparse documentation for ArgumentParser.add_argument() and its nargs parameter, then check how the existing help parameter documentation describes SUPPRESS. Document the nargs constants listed in the issue, including the values for OPTIONAL, ZERO_OR_MORE, and ONE_OR_MORE and the missing PARSER and REMAINDER descriptions; done when all listed constants are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100