Open Milo-Lu opened 4 years ago
(By "extra" I assume you are meaning that they are retrieved but not used.) django-lint does not currently detect this but given that the underlying pylint tool can detect unused local variables then it might be possible to some degree but there would be so many false positives as model instances can be passed between modules... so, no, on balance I don't think this woud be a good thing to add.
Regarding using values_list
etc. I would not recommend this approach as it moves you out of the world of Django into "raw" Python - I would use .only()
.
Can django-lint detects places where extra columns are retrieved, and provides suggestions of using
values
orvalues_list
? Thanks