Skip to content

Suppressed group titles should not be printed #115

Closed
@hamdanal

Description

@hamdanal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    argparseConcerns argparsebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions