1- from typing import Any , cast , Dict , List , Optional , TYPE_CHECKING
1+ from typing import Any , cast , Dict , List , Optional , TYPE_CHECKING , Union
22
33from gitlab import exceptions as exc
44from gitlab .base import RESTManager , RESTObject
55from gitlab .mixins import (
66 CreateMixin ,
7+ CRUDMixin ,
78 DeleteMixin ,
89 GetWithoutIdMixin ,
910 ListMixin ,
@@ -189,9 +190,7 @@ def save(self, **kwargs: Any) -> None:
189190 SaveMixin .save (self , ** kwargs )
190191
191192
192- class ProjectMergeRequestApprovalRuleManager (
193- ListMixin , UpdateMixin , CreateMixin , DeleteMixin , RESTManager
194- ):
193+ class ProjectMergeRequestApprovalRuleManager (CRUDMixin , RESTManager ):
195194 _path = "/projects/{project_id}/merge_requests/{mr_iid}/approval_rules"
196195 _obj_cls = ProjectMergeRequestApprovalRule
197196 _from_parent_attrs = {"project_id" : "project_id" , "mr_iid" : "iid" }
@@ -214,6 +213,13 @@ class ProjectMergeRequestApprovalRuleManager(
214213 optional = ("approval_project_rule_id" , "user_ids" , "group_ids" ),
215214 )
216215
216+ def get (
217+ self , id : Union [str , int ], lazy : bool = False , ** kwargs : Any
218+ ) -> ProjectMergeRequestApprovalRule :
219+ return cast (
220+ ProjectMergeRequestApprovalRule , super ().get (id = id , lazy = lazy , ** kwargs )
221+ )
222+
217223 def create (
218224 self , data : Optional [Dict [str , Any ]] = None , ** kwargs : Any
219225 ) -> RESTObject :
0 commit comments