7👍
Easiest, provided your problematic code is not out of your control (e.g. autogenerated), is to disable the complaints in the areas you know they’re spurious. Copying an example straight out of the message that first introduced this solution:
1 class foo:
2 # pylint: disable=W1234
3 def bar(self):
4 # pylint: disable=W4321
5 pass
6 def gnurz(self):
7 pass
7👍
I don’t like repeating myself, but here is an answer that actually works:
https://stackoverflow.com/a/31000713/78234
From the answer:
Do not disable or weaken Pylint functionality by adding ignores
or generated-members
.
Use an actively developed Pylint plugin that understands Django.
This Pylint plugin for Django works quite well:
pip install pylint-django
and when running pylint add the following flag to the command:
--load-plugins pylint_django
Detailed blog post here.
- Django's syncdb fails with MySQL errno: 150
- Django admin – how to get all registered models in templatetag?
5👍
if you do not care some pylint’s warnings, like unexistent member(E1101) and too many public methods(R0904), you can easily close it with:
pylint --disable=E1101,R0904
if you are interested with few checkers only, you can run pylint like this:
pylint --enable=basic,variables,classes,design,imports,newstyle,exceptions,format,miscellaneous,metrics,similarities
- Amazon + Django each 12 hours appears that [Errno 5] Input/output error
- Systemctl strange error: Invalid arguments
- How to append extra data to the existing serializer in django