Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit98ccc3c

Browse files
nejchJohnVillalovos
authored andcommitted
chore(cli): ignore coverage on exceptions triggering cli.die
1 parent5d14867 commit98ccc3c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎gitlab/v4/cli.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ def do_project_export_download(self) -> None:
125125
assertdataisnotNone
126126
sys.stdout.buffer.write(data)
127127

128-
exceptExceptionase:
128+
exceptExceptionase:# pragma: no cover, cli.die is unit-tested
129129
cli.die("Impossible to download the export",e)
130130

131131
defdo_create(self)->gitlab.base.RESTObject:
132132
ifTYPE_CHECKING:
133133
assertisinstance(self.mgr,gitlab.mixins.CreateMixin)
134134
try:
135135
result=self.mgr.create(self.args)
136-
exceptExceptionase:
136+
exceptExceptionase:# pragma: no cover, cli.die is unit-tested
137137
cli.die("Impossible to create object",e)
138138
returnresult
139139

@@ -144,15 +144,15 @@ def do_list(
144144
assertisinstance(self.mgr,gitlab.mixins.ListMixin)
145145
try:
146146
result=self.mgr.list(**self.args)
147-
exceptExceptionase:
147+
exceptExceptionase:# pragma: no cover, cli.die is unit-tested
148148
cli.die("Impossible to list objects",e)
149149
returnresult
150150

151151
defdo_get(self)->Optional[gitlab.base.RESTObject]:
152152
ifisinstance(self.mgr,gitlab.mixins.GetWithoutIdMixin):
153153
try:
154154
result=self.mgr.get(id=None,**self.args)
155-
exceptExceptionase:
155+
exceptExceptionase:# pragma: no cover, cli.die is unit-tested
156156
cli.die("Impossible to get object",e)
157157
returnresult
158158

@@ -163,7 +163,7 @@ def do_get(self) -> Optional[gitlab.base.RESTObject]:
163163
id=self.args.pop(self.cls._id_attr)
164164
try:
165165
result=self.mgr.get(id,lazy=False,**self.args)
166-
exceptExceptionase:
166+
exceptExceptionase:# pragma: no cover, cli.die is unit-tested
167167
cli.die("Impossible to get object",e)
168168
returnresult
169169

@@ -174,7 +174,7 @@ def do_delete(self) -> None:
174174
id=self.args.pop(self.cls._id_attr)
175175
try:
176176
self.mgr.delete(id,**self.args)
177-
exceptExceptionase:
177+
exceptExceptionase:# pragma: no cover, cli.die is unit-tested
178178
cli.die("Impossible to destroy object",e)
179179

180180
defdo_update(self)->Dict[str,Any]:
@@ -189,7 +189,7 @@ def do_update(self) -> Dict[str, Any]:
189189

190190
try:
191191
result=self.mgr.update(id,self.args)
192-
exceptExceptionase:
192+
exceptExceptionase:# pragma: no cover, cli.die is unit-tested
193193
cli.die("Impossible to update object",e)
194194
returnresult
195195

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp