FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Used ListMixin instead of super like other overides added docsting · python-gitlab/python-gitlab@f2dab10 · GitHub

Repository navigation

Commit f2dab10

Browse files
committed
Used ListMixin instead of super like other overides added docsting
1 parent da7c8db commit f2dab10

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

‎gitlab/v4/objects.py‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,8 +1656,26 @@ class ProjectForkManager(CreateMixin, ListMixin, RESTManager):
16561656
_create_attrs = (tuple(), ('namespace', ))
16571657

16581658
def list(self, **kwargs):
1659-
computed_path = self._compute_path(path=(self._path + "s"))
1660-
return super(ProjectForkManager, self).list(path=computed_path, **kwargs)
1659+
"""Retrieve a list of objects.
1660+
1661+
Args:
1662+
all (bool): If True, return all the items, without pagination
1663+
per_page (int): Number of items to retrieve per request
1664+
page (int): ID of the page to return (starts with page 1)
1665+
as_list (bool): If set to False and no pagination option is
1666+
defined, return a generator instead of a list
1667+
**kwargs: Extra options to send to the server (e.g. sudo)
1668+
1669+
Returns:
1670+
list: The list of objects, or a generator if `as_list` is False
1671+
1672+
Raises:
1673+
GitlabAuthenticationError: If authentication is not correct
1674+
GitlabListError: If the server cannot perform the request
1675+
"""
1676+
1677+
path = self._compute_path('/projects/%(project_id)s/forks')
1678+
return ListMixin.list(self, path=path, **kwargs)
16611679

16621680

16631681
class ProjectHook(SaveMixin, ObjectDeleteMixin, RESTObject):
@@ -1813,7 +1831,7 @@ def move(self, to_project_id, **kwargs):
18131831
path = '%s/%s/move' % (self.manager.path, self.get_id())
18141832
data = {'to_project_id': to_project_id}
18151833
server_data = self.manager.gitlab.http_post(path, post_data=data,
1816-
**kwargs)
1834+
**kwargs)
18171835
self._update_attrs(server_data)
18181836

18191837
@cli.register_custom_action('ProjectIssue')

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL