-
Notifications
You must be signed in to change notification settings - Fork 118
Fix for Reverse Manager update_or_create
calls
#299
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 1336
💛 - Coveralls |
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.
Patch looks good but needs a test. func_noerror_model_methods.py
looks like a good pace to me.
Unfortunately CI fails with what looks like an Astroid issue (could be several issues as well). The cron build yesterday passed so IDK what's causing it to break. We can't merge until this is solved though.
I went to create a test for this, but I believe I discovered some deeper problems with the message suppression code. I noticed that when I try to add a I tracked this down to be related to the call It also looks like the Basically, if I comment out all the lines from Am I way off base or missing something here? From what I can tell, there appear to be some deeper problems. |
I still need the test code before I can answer any of this. It looks like astroid had been updated recently and it could be that our suppression machinery stopped working. Or it could be something completely different. |
I went ahead and added the test code, but in Separately, I noticed that this isn't the only missing method from the Is there a reason the union isn't also used in |
Can you rebase onto latest master so we can see the test results now? Thanks. |
This attr list appears to be missing `update_or_create` which means that reverse related managers throw an error when trying to use them like `self.<MANAGER>.update_or_create()`.
To answer the question:
My understanding is that when pylint is inspecting a piece of code like
With the explanation above
Yap, probably there are many others missing. The historical reason for this is documented as a comment:
That said we already require that Django be properly configured so it is probably feasible to try and get all attributes automatically instead of listing them one by one. The reason it's not done by now is lack of time & attention (and lack of many bugs reported against this area). I will open an issue to take a look into this. |
This attr list appears to be missing
update_or_create
which means that reverse related managers throw an error when trying to use them likeself.<MANAGER>.update_or_create()
.