Skip to content

Commit

Permalink
Drop invalid doc about raised exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Jun 11, 2017
1 parent a0f215c commit 197ffd7
Showing 1 changed file with 2 additions and 59 deletions.
61 changes: 2 additions & 59 deletions gitlab/v4/objects.py
Expand Up @@ -395,10 +395,6 @@ def content(self, streamed=False, action=None, chunk_size=1024, **kwargs):
Returns:
str: The snippet content.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabGetError: If the server fails to perform the request.
"""
path = '/snippets/%s/raw' % self.get_id()
result = self.manager.gitlab.http_get(path, streamed=streamed,
Expand Down Expand Up @@ -522,10 +518,6 @@ def erase(self, **kwargs):

def keep_artifacts(self, **kwargs):
"""Prevent artifacts from being delete when expiration is set.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabCreateError: If the request failed.
"""
path = '%s/%s/artifacts/keep' % (self.manager.path, self.get_id())
self.manager.gitlab.http_post(path)
Expand All @@ -544,10 +536,6 @@ def artifacts(self, streamed=False, action=None, chunk_size=1024,
Returns:
str: The artifacts if `streamed` is False, None otherwise.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabGetError: If the artifacts are not available.
"""
path = '%s/%s/artifacts' % (self.manager.path, self.get_id())
result = self.manager.gitlab.get_http(path, streamed=streamed,
Expand All @@ -567,10 +555,6 @@ def trace(self, streamed=False, action=None, chunk_size=1024, **kwargs):
Returns:
str: The trace.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabGetError: If the trace is not available.
"""
path = '%s/%s/trace' % (self.manager.path, self.get_id())
result = self.manager.gitlab.get_http(path, streamed=streamed,
Expand Down Expand Up @@ -643,9 +627,6 @@ def cherry_pick(self, branch, **kwargs):
Args:
branch (str): Name of target branch.
Raises:
GitlabCherryPickError: If the cherry pick could not be applied.
"""
path = '%s/%s/cherry_pick' % (self.manager.path, self.get_id())
post_data = {'branch': branch}
Expand Down Expand Up @@ -764,11 +745,7 @@ class ProjectIssue(SubscribableMixin, TodoMixin, TimeTrackingMixin, SaveMixin,
_managers = (('notes', 'ProjectIssueNoteManager'), )

def move(self, to_project_id, **kwargs):
"""Move the issue to another project.
Raises:
GitlabConnectionError: If the server cannot be reached.
"""
"""Move the issue to another project."""
path = '%s/%s/move' % (self.manager.path, self.get_id())
data = {'to_project_id': to_project_id}
server_data = self.manager.gitlab.http_post(path, post_data=data,
Expand Down Expand Up @@ -840,11 +817,6 @@ def set_release_description(self, description, **kwargs):
Args:
description (str): Description of the release.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabCreateError: If the server fails to create the release.
GitlabUpdateError: If the server fails to update the release.
"""
path = '%s/%s/release' % (self.manager.path, self.get_id())
data = {'description': description}
Expand Down Expand Up @@ -1099,9 +1071,6 @@ def get(self, file_path, **kwargs):
Returns:
object: The generated RESTObject.
Raises:
GitlabGetError: If the server cannot perform the request.
"""
file_path = file_path.replace('/', '%2F')
return GetMixin.get(self, file_path, **kwargs)
Expand All @@ -1122,10 +1091,6 @@ def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024,
Returns:
str: The file content
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabGetError: If the server fails to perform the request.
"""
file_path = file_path.replace('/', '%2F')
path = '%s/%s/raw' % (self.path, file_path)
Expand Down Expand Up @@ -1200,10 +1165,6 @@ def content(self, streamed=False, action=None, chunk_size=1024, **kwargs):
Returns:
str: The snippet content
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabGetError: If the server fails to perform the request.
"""
path = "%s/%s/raw" % (self.manager.path, self.get_id())
result = self.manager.gitlab.http_get(path, streamed=streamed,
Expand All @@ -1222,12 +1183,7 @@ class ProjectSnippetManager(CRUDMixin, RESTManager):

class ProjectTrigger(SaveMixin, RESTObject):
def take_ownership(self, **kwargs):
"""Update the owner of a trigger.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabGetError: If the server fails to perform the request.
"""
"""Update the owner of a trigger."""
path = '%s/%s/take_ownership' % (self.manager.path, self.get_id())
server_data = self.manager.gitlab.http_post(path, **kwargs)
self._update_attrs(server_data)
Expand Down Expand Up @@ -1611,10 +1567,6 @@ def all(self, scope=None, **kwargs):
Returns:
list(Runner): a list of runners matching the scope.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabListError: If the resource cannot be found
"""
path = '/runners/all'
query_data = {}
Expand Down Expand Up @@ -1645,10 +1597,6 @@ def mark_all_as_done(self, **kwargs):
Returns:
The number of todos maked done.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabDeleteError: If the resource cannot be found
"""
self.gitlab.http_post('/todos/mark_as_done', **kwargs)

Expand Down Expand Up @@ -1708,11 +1656,6 @@ def transfer_project(self, id, **kwargs):
Attrs:
id (int): ID of the project to transfer.
Raises:
GitlabConnectionError: If the server cannot be reached.
GitlabTransferProjectError: If the server fails to perform the
request.
"""
path = '/groups/%d/projects/%d' % (self.id, id)
self.manager.gitlab.http_post(path, **kwargs)
Expand Down

0 comments on commit 197ffd7

Please sign in to comment.