Improve help output

This commit is contained in:
TSR Berry 2023-10-10 16:59:25 +02:00
parent 9560921805
commit 223d642422
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
4 changed files with 26 additions and 14 deletions

View file

@ -28,9 +28,9 @@ options:
-h, --help show this help message and exit
subcommands:
setup-git Set git identity to Ryujinx-Mako
update-reviewers Update reviewers for the specified PR
{setup-git,update-reviewers}
setup-git Configure git identity for Ryujinx-Mako
update-reviewers Update reviewers for the specified PR
```
### setup-git
@ -38,11 +38,11 @@ subcommands:
```
usage: ryujinx_mako setup-git [-h] [-l]
Set git identity to Ryujinx-Mako
Configure git identity for Ryujinx-Mako
options:
-h, --help show this help message and exit
-l, --local Set git identity only for the current repository.
-l, --local configure the git identity only for the current repository
```
### update-reviewers
@ -53,9 +53,9 @@ usage: ryujinx_mako update-reviewers [-h] repo_path pr_number config_path
Update reviewers for the specified PR
positional arguments:
repo_path
pr_number
config_path
repo_path full name of the GitHub repository (format: OWNER/REPO)
pr_number the number of the pull request to check
config_path the path to the reviewers config file
options:
-h, --help show this help message and exit

View file

@ -20,7 +20,7 @@ for subcommand in commands.SUBCOMMANDS:
subcommand_parser = subparsers.add_parser(
subcommand.name(),
description=subcommand.description(),
add_help=True,
help=subcommand.description(),
)
Subcommand.add_subcommand(subcommand.name(), subcommand(subcommand_parser))
# Keep a reference to the subcommand

View file

@ -12,14 +12,14 @@ class SetupGit(GithubSubcommand):
@staticmethod
def description() -> str:
return f"Set git identity to {NAME}"
return f"Configure git identity for {NAME}"
def __init__(self, parser: ArgumentParser):
parser.add_argument(
"-l",
"--local",
action="store_true",
help="Set git identity only for the current repository.",
help="configure the git identity only for the current repository",
)
super().__init__(parser)

View file

@ -21,9 +21,21 @@ class UpdateReviewers(GithubSubcommand):
self._reviewers = set()
self._team_reviewers = set()
parser.add_argument("repo_path", type=str)
parser.add_argument("pr_number", type=int)
parser.add_argument("config_path", type=Path)
parser.add_argument(
"repo_path",
type=str,
help="full name of the GitHub repository (format: OWNER/REPO)",
)
parser.add_argument(
"pr_number",
type=int,
help="the number of the pull request to check"
)
parser.add_argument(
"config_path",
type=Path,
help="the path to the reviewers config file",
)
super().__init__(parser)