| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5a4a940 commit f1ef565
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -134,7 +134,6 @@ def _get_base_parser(add_help: bool = True) -> argparse.ArgumentParser: | |||
| 134 | 134 | parser = argparse.ArgumentParser( | |
| 135 | 135 | add_help=add_help, | |
| 136 | 136 | description="GitLab API Command Line Interface", | |
| 137 | - formatter_class=VerticalHelpFormatter, | ||
| 138 | 137 | allow_abbrev=False, | |
| 139 | 138 | ) | |
| 140 | 139 | parser.add_argument("--version", help="Display the version.", action="store_true") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -382,8 +382,12 @@ def extend_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser: | |||
| 382 | 382 | ||
| 383 | 383 | for cls in sorted(classes, key=operator.attrgetter("__name__")): | |
| 384 | 384 | arg_name = cli.cls_to_gitlab_resource(cls) | |
| 385 | + mgr_cls_name = f"{cls.__name__}Manager" | ||
| 386 | + mgr_cls = getattr(gitlab.v4.objects, mgr_cls_name) | ||
| 385 | 387 | object_group = subparsers.add_parser( | |
| 386 | - arg_name, formatter_class=cli.VerticalHelpFormatter | ||
| 388 | + arg_name, | ||
| 389 | + formatter_class=cli.VerticalHelpFormatter, | ||
| 390 | + help=f"API endpoint: {mgr_cls._path}", | ||
| 387 | 391 | ) | |
| 388 | 392 | ||
| 389 | 393 | object_subparsers = object_group.add_subparsers( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,12 +34,6 @@ def test_config_error_with_help_prints_help(script_runner): | |||
| 34 | 34 | assert ret.returncode == 0 | |
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | - def test_global_help_prints_resources_vertically(script_runner): | ||
| 38 | - ret = script_runner.run(["gitlab", "--help"]) | ||
| 39 | - assert """resource:\n application\n application-appearance\n""" in ret.stdout | ||
| 40 | - assert ret.returncode == 0 | ||
| 41 | - | ||
| 42 | - | ||
| 43 | 37 | def test_resource_help_prints_actions_vertically(script_runner): | |
| 44 | 38 | ret = script_runner.run(["gitlab", "project", "--help"]) | |
| 45 | 39 | assert """action:\n list\n get""" in ret.stdout | |
| Back | FazBrowse Home | New Git URL |
0 commit comments