diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-06-18 13:11:12 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-06-18 13:11:12 +0200 |
commit | 6e5a6ec1f7c2993697c359b2bcab0e1324e219bc (patch) | |
tree | 0c4bbb6579ce48e5bd9c68e410d4db88b316847c | |
parent | 1922cd5d9b182902586170927acb758f8a6f614c (diff) | |
download | gitlab-6e5a6ec1f7c2993697c359b2bcab0e1324e219bc.tar.gz |
minor doc updates
-rw-r--r-- | gitlab/base.py | 11 | ||||
-rw-r--r-- | gitlab/v4/objects.py | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gitlab/base.py b/gitlab/base.py index ec7091b..df25a36 100644 --- a/gitlab/base.py +++ b/gitlab/base.py @@ -602,6 +602,7 @@ class RESTObject(object): self.__dict__['_attrs'].update(new_attrs) def get_id(self): + """Returns the id of the resource.""" if self._id_attr is None: return None return getattr(self, self._id_attr) @@ -622,6 +623,16 @@ class RESTObjectList(object): _list: A GitlabList object """ def __init__(self, manager, obj_cls, _list): + """Creates an objects list from a GitlabList. + + You should not create objects of this type, but use managers list() + methods instead. + + Args: + manager: the RESTManager to attach to the objects + obj_cls: the class of the created objects + _list: the GitlabList holding the data + """ self.manager = manager self._obj_cls = obj_cls self._list = _list diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 2370de0..87a197f 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -1648,7 +1648,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): def transfer_project(self, id, **kwargs): """Transfers a project to this group. - Attrs: + Args: id (int): ID of the project to transfer. """ path = '/groups/%d/projects/%d' % (self.id, id) |