diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-08-13 16:50:14 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-08-13 16:53:35 +0200 |
commit | 451c17492e1399e2359c761f1fb27982e6596696 (patch) | |
tree | ac561efc6400f63dc13da108249668fa037cbbdd /gitlab/objects.py | |
parent | a8f6fdd43bba84270ec841eb019ea5c332d26e04 (diff) | |
download | gitlab-451c17492e1399e2359c761f1fb27982e6596696.tar.gz |
Remove _get_list_or_object() and its tests
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r-- | gitlab/objects.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py index cdef349..60d10ed 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -168,8 +168,6 @@ class GitlabObject(object): _id_in_update_url = True _constructorTypes = None - #: Whether _get_list_or_object should return list or object when id is None - getListWhenNoId = True #: Tells if GitLab-api allows retrieving single objects. canGet = True #: Tells if GitLab-api allows listing of objects. @@ -282,13 +280,6 @@ class GitlabObject(object): raise GitlabGetError("Object not found") - @classmethod - def _get_list_or_object(cls, gl, id, **kwargs): - if id is None and cls.getListWhenNoId: - return cls.list(gl, **kwargs) - else: - return cls.get(gl, id, **kwargs) - def _get_object(self, k, v): if self._constructorTypes and k in self._constructorTypes: return globals()[self._constructorTypes[k]](self.gitlab, v) @@ -1604,7 +1595,6 @@ class ProjectFile(GitlabObject): 'commit_message'] optionalCreateAttrs = ['encoding'] requiredDeleteAttrs = ['branch_name', 'commit_message', 'file_path'] - getListWhenNoId = False shortPrintAttr = 'file_path' getRequiresId = False |