You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat t.py
import argparse
from rich_argparse import RichHelpFormatter
parser = argparse.ArgumentParser(
"awesome_program",
description="This is the %(prog)s program.",
formatter_class=RichHelpFormatter,
)
parser.add_argument("--version", action="version", version="%(prog)s 1.0.0")
parser.parse_args()
$ python t.py --version
%(prog)s 1.0.0
$ python t.py --help
usage: awesome_program [-h] [--version]
This is the %(prog)s program.
OPTIONS
-h, --help show this help message and exit
--version show program's version number and exit
Expected behaviour: replace %(prog)s by awesome_program in the printed text
The text was updated successfully, but these errors were encountered:
Expected behaviour: replace
%(prog)s
byawesome_program
in the printed textThe text was updated successfully, but these errors were encountered: