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

Commit0717517

Browse files
nejchJohnVillalovos
authored andcommitted
feat(mixins): allow deleting resources without IDs
1 parent5beda3b commit0717517

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎gitlab/mixins.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ class DeleteMixin(_RestManagerBase):
463463
gitlab:gitlab.Gitlab
464464

465465
@exc.on_http_error(exc.GitlabDeleteError)
466-
defdelete(self,id:Union[str,int],**kwargs:Any)->None:
466+
defdelete(self,id:Optional[Union[str,int]]=None,**kwargs:Any)->None:
467467
"""Delete an object on the server.
468468
469469
Args:
@@ -478,6 +478,9 @@ def delete(self, id: Union[str, int], **kwargs: Any) -> None:
478478
path=self.path
479479
else:
480480
path=f"{self.path}/{utils.EncodedId(id)}"
481+
482+
ifTYPE_CHECKING:
483+
assertpathisnotNone
481484
self.gitlab.http_delete(path,**kwargs)
482485

483486

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp