summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2020-10-11 13:38:31 +0200
committerNejc Habjan <nejc.habjan@siemens.com>2020-10-11 14:13:09 +0200
commit6c21fc83d3d6173bffb60e686ec579f875f8bebe (patch)
tree4e5e41c42257bc3e075eafc5969062f6fe136fc3 /gitlab/cli.py
parent68a41629ca0c27bd62d8e656071f612d443aaa1b (diff)
downloadgitlab-docs/cli-reference-page.tar.gz
docs(cli): add auto-generated CLI referencedocs/cli-reference-page
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index d356d16..ff98a4f 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -149,6 +149,20 @@ def _parse_value(v):
return v
+def docs():
+ """
+ Provide a statically generated parser for sphinx only, so we don't need
+ to provide dummy gitlab config for readthedocs.
+ """
+ if "sphinx" not in sys.modules:
+ sys.exit("Docs parser is only intended for build_sphinx")
+
+ parser = _get_base_parser(add_help=False)
+ cli_module = importlib.import_module("gitlab.v4.cli")
+
+ return _get_parser(cli_module)
+
+
def main():
if "--version" in sys.argv:
print(gitlab.__version__)