summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-11-28 02:17:56 +0100
committerGitHub <noreply@github.com>2021-11-28 02:17:56 +0100
commit09a973ee379d82af05a5080decfaec16d2f4eab3 (patch)
treedf53d3f94109d124f4e8625d10417110f164d35a /gitlab/cli.py
parent93a3893977d4e3a3e1916a94293e66373b1458fb (diff)
parent381c748415396e0fe54bb1f41a3303bab89aa065 (diff)
downloadgitlab-09a973ee379d82af05a5080decfaec16d2f4eab3.tar.gz
Merge pull request #1721 from python-gitlab/test/cli-coverage
test(cli): improve basic CLI coverage
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index a0134ec..c1a1334 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -178,7 +178,7 @@ def _parse_value(v: Any) -> Any:
return v
-def docs() -> argparse.ArgumentParser:
+def docs() -> argparse.ArgumentParser: # pragma: no cover
"""
Provide a statically generated parser for sphinx only, so we don't need
to provide dummy gitlab config for readthedocs.
@@ -208,7 +208,7 @@ def main() -> None:
sys.exit(0)
sys.exit(e)
# We only support v4 API at this time
- if config.api_version not in ("4",):
+ if config.api_version not in ("4",): # dead code # pragma: no cover
raise ModuleNotFoundError(name=f"gitlab.v{config.api_version}.cli")
# Now we build the entire set of subcommands and do the complete parsing
@@ -216,7 +216,7 @@ def main() -> None:
try:
import argcomplete # type: ignore
- argcomplete.autocomplete(parser)
+ argcomplete.autocomplete(parser) # pragma: no cover
except Exception:
pass
args = parser.parse_args()