@@ -140,7 +140,7 @@ def set_approvers(
140140approval_rules :ProjectMergeRequestApprovalRuleManager = (
141141self ._parent .approval_rules
142142 )
143- """ update any existing approval rule matching the name"""
143+ # update any existing approval rule matching the name
144144existing_approval_rules = approval_rules .list ()
145145for ar in existing_approval_rules :
146146if ar .name == approval_rule_name :
@@ -149,7 +149,7 @@ def set_approvers(
149149ar .group_ids = data ["group_ids" ]
150150ar .save ()
151151return ar
152- """ if there was no rule matching the rule name, create a new one"""
152+ # if there was no rule matching the rule name, create a new one
153153return approval_rules .create (data = data )
154154
155155
@@ -171,13 +171,13 @@ def save(self, **kwargs: Any) -> None:
171171 GitlabAuthenticationError: If authentication is not correct
172172 GitlabUpdateError: If the server cannot perform the request
173173 """
174- # There is a mismatch between the name of our id attribute and the put REST API name for the
175- # project_id, so we override it here.
174+ # There is a mismatch between the name of our id attribute and the put
175+ #REST API name for the project_id, so we override it here.
176176self .approval_rule_id = self .id
177177self .merge_request_iid = self ._parent_attrs ["mr_iid" ]
178178self .id = self ._parent_attrs ["project_id" ]
179- # save will update self.id with the result from the server, so no need to overwrite with
180- # what it was before we overwrote it."""
179+ # save will update self.id with the result from the server, so no need
180+ #to overwrite with what it was before we overwrote it.
181181SaveMixin .save (self ,** kwargs )
182182
183183
@@ -198,8 +198,9 @@ class ProjectMergeRequestApprovalRuleManager(
198198 ),
199199optional = ("user_ids" ,"group_ids" ),
200200 )
201- # Important: When approval_project_rule_id is set, the name, users and groups of
202- # project-level rule will be copied. The approvals_required specified will be used. """
201+ # Important: When approval_project_rule_id is set, the name, users and
202+ # groups of project-level rule will be copied. The approvals_required
203+ # specified will be used.
203204_create_attrs = RequiredOptional (
204205required = ("id" ,"merge_request_iid" ,"name" ,"approvals_required" ),
205206optional = ("approval_project_rule_id" ,"user_ids" ,"group_ids" ),