summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-05-27 08:28:46 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2017-05-27 08:28:46 +0200
commitf3b28553aaa5e4e71df7892ea6c34fcc8dc61f90 (patch)
treea5f0e8dd6016a4808fef07e58184befd85c4b415
parent06631847a7184cb22e28cd170c034a4d6d16fe8f (diff)
downloadgitlab-f3b28553aaa5e4e71df7892ea6c34fcc8dc61f90.tar.gz
Remove extra_attrs argument from _raw_list (unneeded)
-rw-r--r--gitlab/__init__.py6
-rw-r--r--gitlab/v3/objects.py20
-rw-r--r--gitlab/v4/objects.py16
3 files changed, 11 insertions, 31 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index e6024a8..4adc563 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -344,9 +344,8 @@ class Gitlab(object):
raise GitlabConnectionError(
"Can't connect to GitLab server (%s)" % e)
- def _raw_list(self, path_, cls, extra_attrs={}, **kwargs):
- params = extra_attrs.copy()
- params.update(kwargs.copy())
+ def _raw_list(self, path_, cls, **kwargs):
+ params = kwargs.copy()
catch_recursion_limit = kwargs.get('safe_all', False)
get_all_results = (kwargs.get('all', False) is True
@@ -376,7 +375,6 @@ class Gitlab(object):
if ('next' in r.links and 'url' in r.links['next']
and get_all_results):
args = kwargs.copy()
- args.update(extra_attrs)
args['next_url'] = r.links['next']['url']
results.extend(self.list(cls, **args))
except Exception as e:
diff --git a/gitlab/v3/objects.py b/gitlab/v3/objects.py
index 01bb670..b2fd180 100644
--- a/gitlab/v3/objects.py
+++ b/gitlab/v3/objects.py
@@ -799,9 +799,7 @@ class ProjectCommit(GitlabObject):
"""
url = '/projects/%s/repository/commits/%s/builds' % (self.project_id,
self.id)
- return self.gitlab._raw_list(url, ProjectBuild,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectBuild, **kwargs)
def cherry_pick(self, branch, **kwargs):
"""Cherry-pick a commit into a branch.
@@ -1254,9 +1252,7 @@ class ProjectMergeRequest(GitlabObject):
"""
url = ('/projects/%s/merge_requests/%s/closes_issues' %
(self.project_id, self.id))
- return self.gitlab._raw_list(url, ProjectIssue,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectIssue, **kwargs)
def commits(self, **kwargs):
"""List the merge request commits.
@@ -1270,9 +1266,7 @@ class ProjectMergeRequest(GitlabObject):
"""
url = ('/projects/%s/merge_requests/%s/commits' %
(self.project_id, self.id))
- return self.gitlab._raw_list(url, ProjectCommit,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectCommit, **kwargs)
def changes(self, **kwargs):
"""List the merge request changes.
@@ -1420,9 +1414,7 @@ class ProjectMilestone(GitlabObject):
def issues(self, **kwargs):
url = "/projects/%s/milestones/%s/issues" % (self.project_id, self.id)
- return self.gitlab._raw_list(url, ProjectIssue,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectIssue, **kwargs)
def merge_requests(self, **kwargs):
"""List the merge requests related to this milestone
@@ -1436,9 +1428,7 @@ class ProjectMilestone(GitlabObject):
"""
url = ('/projects/%s/milestones/%s/merge_requests' %
(self.project_id, self.id))
- return self.gitlab._raw_list(url, ProjectMergeRequest,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectMergeRequest, **kwargs)
class ProjectMilestoneManager(BaseManager):
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 48ece81..a511e07 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1201,9 +1201,7 @@ class ProjectMergeRequest(GitlabObject):
"""
url = ('/projects/%s/merge_requests/%s/closes_issues' %
(self.project_id, self.iid))
- return self.gitlab._raw_list(url, ProjectIssue,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectIssue, **kwargs)
def commits(self, **kwargs):
"""List the merge request commits.
@@ -1217,9 +1215,7 @@ class ProjectMergeRequest(GitlabObject):
"""
url = ('/projects/%s/merge_requests/%s/commits' %
(self.project_id, self.iid))
- return self.gitlab._raw_list(url, ProjectCommit,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectCommit, **kwargs)
def changes(self, **kwargs):
"""List the merge request changes.
@@ -1376,9 +1372,7 @@ class ProjectMilestone(GitlabObject):
def issues(self, **kwargs):
url = "/projects/%s/milestones/%s/issues" % (self.project_id, self.id)
- return self.gitlab._raw_list(url, ProjectIssue,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectIssue, **kwargs)
def merge_requests(self, **kwargs):
"""List the merge requests related to this milestone
@@ -1392,9 +1386,7 @@ class ProjectMilestone(GitlabObject):
"""
url = ('/projects/%s/milestones/%s/merge_requests' %
(self.project_id, self.id))
- return self.gitlab._raw_list(url, ProjectMergeRequest,
- {'project_id': self.project_id},
- **kwargs)
+ return self.gitlab._raw_list(url, ProjectMergeRequest, **kwargs)
class ProjectMilestoneManager(BaseManager):