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

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

Merged
nejch merged 1 commit intomainfromjlvillal/mypy_merge_requests
Nov 7, 2021

Conversation

@JohnVillalovos
Copy link
Member

  • 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.

 * 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.
@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/mypy_merge_requests branch from8a0f9de tof9c0ad9CompareNovember 7, 2021 00:17
@codecov-commenter
Copy link

Codecov Report

Merging#1673 (f9c0ad9) intomain (4ab9e92) willdecrease coverage by0.03%.
The diff coverage is84.21%.

@@            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
FlagCoverage Δ
cli_func_v481.88% <73.68%> (-0.04%)⬇️
py_func_v481.15% <84.21%> (-0.02%)⬇️
unit83.68% <68.42%> (-0.04%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/v4/objects/merge_requests.py85.18% <84.21%> (-0.65%)⬇️

Comment on lines +459 to +462
defget(
self,id:Union[str,int],lazy:bool=False,**kwargs:Any
)->ProjectMergeRequest:
returncast(ProjectMergeRequest,super().get(id=id,lazy=lazy,**kwargs))
Copy link
Member

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?

@nejchnejch merged commit32ea954 intomainNov 7, 2021
@nejchnejch deleted the jlvillal/mypy_merge_requests branchNovember 7, 2021 09:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nejchnejchnejch approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@JohnVillalovos@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp