Skip to content

Commit

Permalink
fix: argument type was not a tuple as expected
Browse files Browse the repository at this point in the history
While adding type-hints mypy flagged this as an issue. The third
argument to register_custom_action is supposed to be a tuple. It was
being passed as a string rather than a tuple of strings.
  • Loading branch information
JohnVillalovos committed Apr 18, 2021
1 parent 916a7fe commit 062f8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitlab/v4/objects/merge_requests.py
Expand Up @@ -234,7 +234,7 @@ def pipelines(self, **kwargs):
path = "%s/%s/pipelines" % (self.manager.path, self.get_id())
return self.manager.gitlab.http_get(path, **kwargs)

@cli.register_custom_action("ProjectMergeRequest", tuple(), ("sha"))
@cli.register_custom_action("ProjectMergeRequest", tuple(), ("sha",))
@exc.on_http_error(exc.GitlabMRApprovalError)
def approve(self, sha=None, **kwargs):
"""Approve the merge request.
Expand Down

0 comments on commit 062f8f6

Please sign in to comment.