- Notifications
You must be signed in to change notification settings - Fork674
chore: add type-hints to gitlab/v4/objects/merge_requests.py#1673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
* Add type-hints to gitlab/v4/objects/merge_requests.py * Add return value to cancel_merge_when_pipeline_succeeds() function as GitLab docs show it returns a value. * Add return value to approve() function as GitLab docs show it returns a value. * Add 'get()' method so that type-checkers will understand that getting a project merge request is of type ProjectMergeRequest.
8a0f9de tof9c0ad9Comparecodecov-commenter commentedNov 7, 2021
Codecov Report
@@ Coverage Diff @@## main #1673 +/- ##==========================================- Coverage 91.99% 91.96% -0.04%========================================== Files 75 75 Lines 4337 4345 +8 ==========================================+ Hits 3990 3996 +6- Misses 347 349 +2
Flags with carried forward coverage won't be shown.Click here to find out more.
|
| defget( | ||
| self,id:Union[str,int],lazy:bool=False,**kwargs:Any | ||
| )->ProjectMergeRequest: | ||
| returncast(ProjectMergeRequest,super().get(id=id,lazy=lazy,**kwargs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Maybe for a follow-up it'd be good to document this in the Development docs so we can point people to this in case they are adding new managers and get hit by mypy errors?
as GitLab docs show it returns a value.
returns a value.
getting a project merge request is of type ProjectMergeRequest.