Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/treesum.py @ 347:3f4840eeb0f4
treesum: optimize help output: do not print "-h/--help" for "patterns" and "help"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 01 Apr 2025 18:56:17 +0200 |
| parents | d47965f97abb |
| children | 539e2facbb28 |
comparison
equal
deleted
inserted
replaced
| 346:d47965f97abb | 347:3f4840eeb0f4 |
|---|---|
| 288 _populate_info_arguments(infoparser) | 288 _populate_info_arguments(infoparser) |
| 289 | 289 |
| 290 hparser = subparsers.add_parser( | 290 hparser = subparsers.add_parser( |
| 291 "help", | 291 "help", |
| 292 help="Show this help message or a subcommand's help and exit", | 292 help="Show this help message or a subcommand's help and exit", |
| 293 description="Show this help message or a subcommand's help and exit.") | 293 description="Show this help message or a subcommand's help and exit.", |
| 294 add_help=False) | |
| 294 hparser.add_argument("help_command", nargs='?', metavar="COMMAND") | 295 hparser.add_argument("help_command", nargs='?', metavar="COMMAND") |
| 295 | 296 |
| 296 patparser = subparsers.add_parser( | 297 patparser = subparsers.add_parser( |
| 297 "patterns", | 298 "patterns", |
| 298 help="Show the help for PATTERNs and exit", | 299 help="Show the help for PATTERNs and exit", |
| 299 description=fnmatch.HELP_DESCRIPTION, | 300 description=fnmatch.HELP_DESCRIPTION, |
| 300 formatter_class=argparse.RawDescriptionHelpFormatter) | 301 formatter_class=argparse.RawDescriptionHelpFormatter, |
| 302 add_help=False) | |
| 301 | 303 |
| 302 vparser = subparsers.add_parser( | 304 vparser = subparsers.add_parser( |
| 303 "version", | 305 "version", |
| 304 help="Show the program's version number and exit", | 306 help="Show the program's version number and exit", |
| 305 description="Show the program's version number and exit.") | 307 description="Show the program's version number and exit.") |
