summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/api/gitlab.rst78
-rw-r--r--docs/api/modules.rst7
-rw-r--r--docs/ext/docstrings.py14
-rw-r--r--docs/index.rst2
-rw-r--r--gitlab/v4/objects.py4
5 files changed, 61 insertions, 44 deletions
diff --git a/docs/api/gitlab.rst b/docs/api/gitlab.rst
index d34d56f..e75f843 100644
--- a/docs/api/gitlab.rst
+++ b/docs/api/gitlab.rst
@@ -1,55 +1,48 @@
gitlab package
==============
-Module contents
----------------
+Subpackages
+-----------
-.. automodule:: gitlab
+.. toctree::
+
+ gitlab.v3
+ gitlab.v4
+
+Submodules
+----------
+
+gitlab.base module
+------------------
+
+.. automodule:: gitlab.base
:members:
:undoc-members:
:show-inheritance:
- :exclude-members: Hook, UserProject, Group, Issue, Team, User,
- all_projects, owned_projects, search_projects
-gitlab.base
------------
+gitlab.cli module
+-----------------
-.. automodule:: gitlab.base
+.. automodule:: gitlab.cli
:members:
:undoc-members:
:show-inheritance:
-gitlab.v3.objects module
-------------------------
+gitlab.config module
+--------------------
-.. automodule:: gitlab.v3.objects
+.. automodule:: gitlab.config
:members:
:undoc-members:
:show-inheritance:
- :exclude-members: Branch, Commit, Content, Event, File, Hook, Issue, Key,
- Label, Member, MergeRequest, Milestone, Note, Snippet,
- Tag, canGet, canList, canUpdate, canCreate, canDelete,
- requiredUrlAttrs, requiredListAttrs, optionalListAttrs,
- optionalGetAttrs, requiredGetAttrs, requiredDeleteAttrs,
- requiredCreateAttrs, optionalCreateAttrs,
- requiredUpdateAttrs, optionalUpdateAttrs, getRequiresId,
- shortPrintAttr, idAttr
-gitlab.v4.objects module
-------------------------
+gitlab.const module
+-------------------
-.. automodule:: gitlab.v4.objects
+.. automodule:: gitlab.const
:members:
:undoc-members:
:show-inheritance:
- :exclude-members: Branch, Commit, Content, Event, File, Hook, Issue, Key,
- Label, Member, MergeRequest, Milestone, Note, Snippet,
- Tag, canGet, canList, canUpdate, canCreate, canDelete,
- requiredUrlAttrs, requiredListAttrs, optionalListAttrs,
- optionalGetAttrs, requiredGetAttrs, requiredDeleteAttrs,
- requiredCreateAttrs, optionalCreateAttrs,
- requiredUpdateAttrs, optionalUpdateAttrs, getRequiresId,
- shortPrintAttr, idAttr
gitlab.exceptions module
------------------------
@@ -58,3 +51,28 @@ gitlab.exceptions module
:members:
:undoc-members:
:show-inheritance:
+
+gitlab.mixins module
+--------------------
+
+.. automodule:: gitlab.mixins
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+gitlab.utils module
+-------------------
+
+.. automodule:: gitlab.utils
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+
+Module contents
+---------------
+
+.. automodule:: gitlab
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/api/modules.rst b/docs/api/modules.rst
deleted file mode 100644
index 3ec5a68..0000000
--- a/docs/api/modules.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-API documentation
-=================
-
-.. toctree::
- :maxdepth: 4
-
- gitlab
diff --git a/docs/ext/docstrings.py b/docs/ext/docstrings.py
index fc95eeb..32c5da1 100644
--- a/docs/ext/docstrings.py
+++ b/docs/ext/docstrings.py
@@ -10,6 +10,8 @@ from sphinx.ext.napoleon.docstring import GoogleDocstring
def classref(value, short=True):
+ return value
+
if not inspect.isclass(value):
return ':class:%s' % value
tilde = '~' if short else ''
@@ -46,8 +48,13 @@ class GitlabDocstring(GoogleDocstring):
return output.split('\n')
- def __init__(self, *args, **kwargs):
- super(GitlabDocstring, self).__init__(*args, **kwargs)
+ def __init__(self, docstring, config=None, app=None, what='', name='',
+ obj=None, options=None):
+ super(GitlabDocstring, self).__init__(docstring, config, app, what,
+ name, obj, options)
+
+ if name and name.startswith('gitlab.v4.objects'):
+ return
if getattr(self._obj, '__name__', None) == 'Gitlab':
mgrs = []
@@ -57,9 +64,12 @@ class GitlabDocstring(GoogleDocstring):
mgrs.append(item)
self._parsed_lines.extend(self._build_doc('gl_tmpl.j2',
mgrs=sorted(mgrs)))
+
+ # BaseManager
elif hasattr(self._obj, 'obj_cls') and self._obj.obj_cls is not None:
self._parsed_lines.extend(self._build_doc('manager_tmpl.j2',
cls=self._obj.obj_cls))
+ # GitlabObject
elif hasattr(self._obj, 'canUpdate') and self._obj.canUpdate:
self._parsed_lines.extend(self._build_doc('object_tmpl.j2',
obj=self._obj))
diff --git a/docs/index.rst b/docs/index.rst
index ebfc8fe..7805fcf 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -16,7 +16,7 @@ Contents:
api-usage
switching-to-v4
api-objects
- api/modules
+ api/gitlab
release_notes
changelog
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index f3d1dce..2370de0 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -996,10 +996,6 @@ class ProjectMilestoneManager(RetrieveMixin, CreateMixin, DeleteMixin,
class ProjectLabel(SubscribableMixin, SaveMixin, ObjectDeleteMixin,
RESTObject):
_id_attr = 'name'
- requiredCreateAttrs = ['name', 'color']
- optionalCreateAttrs = ['description', 'priority']
- requiredUpdateAttrs = ['name']
- optionalUpdateAttrs = ['new_name', 'color', 'description', 'priority']
class ProjectLabelManager(GetFromListMixin, CreateMixin, UpdateMixin,