- Notifications
You must be signed in to change notification settings - Fork675
fix: add a check to ensure the MRO is correct#1352
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
max-wittig commentedMar 2, 2021
Thanks for the MR. Could you elaborate why this matters? I know what you can override methods based on the order, but other than that, I'm unsure. Would be interesting to know@JohnVillalovos |
JohnVillalovos commentedMar 2, 2021
Sure. Let me write up a better explanation and post it. It will have to be after my work-day is over here in Oregon. |
JohnVillalovos commentedMar 3, 2021
I have put comments in the test file that explain it better. This PR is assuming that#1344 will be merged. As that is what triggered this issue. |
codecov-io commentedMar 3, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #1352 +/- ##======================================= Coverage 80.21% 80.21% ======================================= Files 73 73 Lines 3801 3801 ======================================= Hits 3049 3049 Misses 752 752
Flags with carried forward coverage won't be shown.Click here to find out more.
Continue to review full report at Codecov.
|
JohnVillalovos commentedMar 3, 2021
@max-wittig Hopefully I have answered your question. |
JohnVillalovos commentedMar 15, 2021
Any more questions or comments about this? |
nejch left a comment
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.
Thanks@JohnVillalovos! Just a few quick comments.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
JohnVillalovos commentedApr 17, 2021
@nejch Thanks for the feedback. I'll try to get some time to work on this in the next few days. |
JohnVillalovos commentedApr 18, 2021
@nejch Updated. I removed the debug code and moved the comments into the docstring. |
Add a check to ensure the MRO (Method Resolution Order) is correct for classes ingitlab.v4.objects when doing type-checking.An example of an incorrect definition: class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin): ^^^^^^^^^^ This should be at the end.Correct way would be: class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject): Correctly at the end ^^^^^^^^^^Also fix classes which have the issue.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This should be merged after:DONE#1344
Add a check to ensure the MRO (Method Resolution Order) is correct for classes in
gitlab.v4.objects.
Also fix classes which have the issue.