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: remove usage of getattr()#1375

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 intopython-gitlab:masterfromJohnVillalovos:jlvillal/update_uses_post
Apr 17, 2021
Merged

chore: remove usage of getattr()#1375

nejch merged 1 commit intopython-gitlab:masterfromJohnVillalovos:jlvillal/update_uses_post
Apr 17, 2021

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovosJohnVillalovos commentedMar 14, 2021
edited
Loading

Remove usage of getattr(self, "_update_uses_post", False)Instead add it to class and set default value to False.Add a test that shows it is set to True for theProjectMergeRequestApprovalManager class.

@codecov-io
Copy link

Codecov Report

Merging#1375 (a8f4c23) intomaster (8ace76a) willincrease coverage by0.00%.
The diff coverage is100.00%.

Impacted file tree graph

@@           Coverage Diff           @@##           master    #1375   +/-   ##=======================================  Coverage   79.95%   79.96%           =======================================  Files          73       73             Lines        4016     4017    +1     =======================================+ Hits         3211     3212    +1  Misses        805      805
FlagCoverage Δ
unit79.96% <100.00%> (+<0.01%)⬆️

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

Impacted FilesCoverage Δ
gitlab/mixins.py77.47% <100.00%> (+0.05%)⬆️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update8ace76a...a8f4c23. Read thecomment docs.

@JohnVillalovosJohnVillalovos marked this pull request as draftMarch 15, 2021 14:22
@JohnVillalovosJohnVillalovos marked this pull request as ready for reviewMarch 15, 2021 14:27
Remove usage of getattr(self, "_update_uses_post", False)Instead add it to class and set default value to False.Add a tests that shows it is set to True for theProjectMergeRequestApprovalManager and ProjectApprovalManager classes.
@JohnVillalovos
Copy link
MemberAuthor

@nejch If you have time to review, it would be appreciated.

Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks again! :) Left a side note for a follow-up if we get to it.

def test_project_approval_manager_update_uses_post(project, resp_snippet):
"""Ensure the
gitlab.v4.objects.merge_request_approvals.ProjectApprovalManager object has
_update_uses_post set to True"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I was originally thinking this would be more appropriate in a separate test/fake manager, to test just this specific aspect of it, e.g. intest_object_mixin_attributes.py. But since it's only used here I think it's ok, maybe for a follow-up PR :)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I can do that, though I'm not quite sure what you want me to do 😕

Do you want a test that shows thatupdate_uses_post exists and is False intest_object_mixin_attributes.py ?

@nejchnejch merged commitd236267 intopython-gitlab:masterApr 17, 2021
@JohnVillalovosJohnVillalovos deleted the jlvillal/update_uses_post branchApril 18, 2021 17:04
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.

3 participants
@JohnVillalovos@codecov-io@nejch

[8]ページ先頭

©2009-2025 Movatter.jp