Investigate subparsers with no arguments

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start in the reverse_argparse handling for subparsers and nested parsers, and construct a minimal case where a subcommand maps directly to a function without arguments. Add test cases that reproduce the behavior, then verify that unparsing nested parsers produces the expected command representation.

Written by the indexing model from the issue text.

Description

Type: Task

Description

I suspect we may have a bug in that reverse_argparse likely doesn't correctly handle the case of a subparser with no argument, e.g., when the subcommand is simply mapped to a function. Need to

  • Develop one or more test cases to prove the point.
  • Fix the unparsing of nested parsers for such situations.
Dominant language
Python
Stars
48
Forks
6
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sandialabs/reverse_argparse

All issues in sandialabs/reverse_argparse

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.