Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppressed group titles should not be printed #115

Closed
hamdanal opened this issue May 9, 2024 · 0 comments · Fixed by #116
Closed

Suppressed group titles should not be printed #115

hamdanal opened this issue May 9, 2024 · 0 comments · Fixed by #116
Labels
argparse Concerns argparse bug Something isn't working

Comments

@hamdanal
Copy link
Owner

hamdanal commented May 9, 2024

To reproduce:

import argparse
from rich_argparse import RichHelpFormatter

parser = argparse.ArgumentParser("PROG", formatter_class=RichHelpFormatter)
group = parser.add_argument_group(title=argparse.SUPPRESS)
group.add_argument("foo")
parser.print_help()

Produces:

Usage: PROG [-h] foo

Options:
  -h, --help  show this help message and exit

==Suppress==:
  foo

Expected:

Usage: PROG [-h] foo

Options:
  -h, --help  show this help message and exit

  foo
@hamdanal hamdanal added bug Something isn't working argparse Concerns argparse labels May 9, 2024
@hamdanal hamdanal changed the title Suppressed group tiles should not be printed Suppressed group titles should not be printed May 9, 2024
hamdanal added a commit that referenced this issue May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argparse Concerns argparse bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant