@@ -395,10 +395,6 @@ def content(self, streamed=False, action=None, chunk_size=1024, **kwargs):
395
395
396
396
Returns:
397
397
str: The snippet content.
398
-
399
- Raises:
400
- GitlabConnectionError: If the server cannot be reached.
401
- GitlabGetError: If the server fails to perform the request.
402
398
"""
403
399
path = '/snippets/%s/raw' % self .get_id ()
404
400
result = self .manager .gitlab .http_get (path , streamed = streamed ,
@@ -522,10 +518,6 @@ def erase(self, **kwargs):
522
518
523
519
def keep_artifacts (self , ** kwargs ):
524
520
"""Prevent artifacts from being delete when expiration is set.
525
-
526
- Raises:
527
- GitlabConnectionError: If the server cannot be reached.
528
- GitlabCreateError: If the request failed.
529
521
"""
530
522
path = '%s/%s/artifacts/keep' % (self .manager .path , self .get_id ())
531
523
self .manager .gitlab .http_post (path )
@@ -544,10 +536,6 @@ def artifacts(self, streamed=False, action=None, chunk_size=1024,
544
536
545
537
Returns:
546
538
str: The artifacts if `streamed` is False, None otherwise.
547
-
548
- Raises:
549
- GitlabConnectionError: If the server cannot be reached.
550
- GitlabGetError: If the artifacts are not available.
551
539
"""
552
540
path = '%s/%s/artifacts' % (self .manager .path , self .get_id ())
553
541
result = self .manager .gitlab .get_http (path , streamed = streamed ,
@@ -567,10 +555,6 @@ def trace(self, streamed=False, action=None, chunk_size=1024, **kwargs):
567
555
568
556
Returns:
569
557
str: The trace.
570
-
571
- Raises:
572
- GitlabConnectionError: If the server cannot be reached.
573
- GitlabGetError: If the trace is not available.
574
558
"""
575
559
path = '%s/%s/trace' % (self .manager .path , self .get_id ())
576
560
result = self .manager .gitlab .get_http (path , streamed = streamed ,
@@ -643,9 +627,6 @@ def cherry_pick(self, branch, **kwargs):
643
627
644
628
Args:
645
629
branch (str): Name of target branch.
646
-
647
- Raises:
648
- GitlabCherryPickError: If the cherry pick could not be applied.
649
630
"""
650
631
path = '%s/%s/cherry_pick' % (self .manager .path , self .get_id ())
651
632
post_data = {'branch' : branch }
@@ -764,11 +745,7 @@ class ProjectIssue(SubscribableMixin, TodoMixin, TimeTrackingMixin, SaveMixin,
764
745
_managers = (('notes' , 'ProjectIssueNoteManager' ), )
765
746
766
747
def move (self , to_project_id , ** kwargs ):
767
- """Move the issue to another project.
768
-
769
- Raises:
770
- GitlabConnectionError: If the server cannot be reached.
771
- """
748
+ """Move the issue to another project."""
772
749
path = '%s/%s/move' % (self .manager .path , self .get_id ())
773
750
data = {'to_project_id' : to_project_id }
774
751
server_data = self .manager .gitlab .http_post (path , post_data = data ,
@@ -840,11 +817,6 @@ def set_release_description(self, description, **kwargs):
840
817
841
818
Args:
842
819
description (str): Description of the release.
843
-
844
- Raises:
845
- GitlabConnectionError: If the server cannot be reached.
846
- GitlabCreateError: If the server fails to create the release.
847
- GitlabUpdateError: If the server fails to update the release.
848
820
"""
849
821
path = '%s/%s/release' % (self .manager .path , self .get_id ())
850
822
data = {'description' : description }
@@ -1099,9 +1071,6 @@ def get(self, file_path, **kwargs):
1099
1071
1100
1072
Returns:
1101
1073
object: The generated RESTObject.
1102
-
1103
- Raises:
1104
- GitlabGetError: If the server cannot perform the request.
1105
1074
"""
1106
1075
file_path = file_path .replace ('/' , '%2F' )
1107
1076
return GetMixin .get (self , file_path , ** kwargs )
@@ -1122,10 +1091,6 @@ def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024,
1122
1091
1123
1092
Returns:
1124
1093
str: The file content
1125
-
1126
- Raises:
1127
- GitlabConnectionError: If the server cannot be reached.
1128
- GitlabGetError: If the server fails to perform the request.
1129
1094
"""
1130
1095
file_path = file_path .replace ('/' , '%2F' )
1131
1096
path = '%s/%s/raw' % (self .path , file_path )
@@ -1200,10 +1165,6 @@ def content(self, streamed=False, action=None, chunk_size=1024, **kwargs):
1200
1165
1201
1166
Returns:
1202
1167
str: The snippet content
1203
-
1204
- Raises:
1205
- GitlabConnectionError: If the server cannot be reached.
1206
- GitlabGetError: If the server fails to perform the request.
1207
1168
"""
1208
1169
path = "%s/%s/raw" % (self .manager .path , self .get_id ())
1209
1170
result = self .manager .gitlab .http_get (path , streamed = streamed ,
@@ -1222,12 +1183,7 @@ class ProjectSnippetManager(CRUDMixin, RESTManager):
1222
1183
1223
1184
class ProjectTrigger (SaveMixin , RESTObject ):
1224
1185
def take_ownership (self , ** kwargs ):
1225
- """Update the owner of a trigger.
1226
-
1227
- Raises:
1228
- GitlabConnectionError: If the server cannot be reached.
1229
- GitlabGetError: If the server fails to perform the request.
1230
- """
1186
+ """Update the owner of a trigger."""
1231
1187
path = '%s/%s/take_ownership' % (self .manager .path , self .get_id ())
1232
1188
server_data = self .manager .gitlab .http_post (path , ** kwargs )
1233
1189
self ._update_attrs (server_data )
@@ -1611,10 +1567,6 @@ def all(self, scope=None, **kwargs):
1611
1567
1612
1568
Returns:
1613
1569
list(Runner): a list of runners matching the scope.
1614
-
1615
- Raises:
1616
- GitlabConnectionError: If the server cannot be reached.
1617
- GitlabListError: If the resource cannot be found
1618
1570
"""
1619
1571
path = '/runners/all'
1620
1572
query_data = {}
@@ -1645,10 +1597,6 @@ def mark_all_as_done(self, **kwargs):
1645
1597
1646
1598
Returns:
1647
1599
The number of todos maked done.
1648
-
1649
- Raises:
1650
- GitlabConnectionError: If the server cannot be reached.
1651
- GitlabDeleteError: If the resource cannot be found
1652
1600
"""
1653
1601
self .gitlab .http_post ('/todos/mark_as_done' , ** kwargs )
1654
1602
@@ -1708,11 +1656,6 @@ def transfer_project(self, id, **kwargs):
1708
1656
1709
1657
Attrs:
1710
1658
id (int): ID of the project to transfer.
1711
-
1712
- Raises:
1713
- GitlabConnectionError: If the server cannot be reached.
1714
- GitlabTransferProjectError: If the server fails to perform the
1715
- request.
1716
1659
"""
1717
1660
path = '/groups/%d/projects/%d' % (self .id , id )
1718
1661
self .manager .gitlab .http_post (path , ** kwargs )
0 commit comments