Ignore by directory using Pylint

Adding the following to my .pylintrc files works with Pylint 0.25: [MASTER] ignore=migrations My problems are with PyDev which (it seems) is not respecting my settings. This is due, I think, to the fact that it’s running Pylint per-file, which I think bypasses ‘ignore’ checks – whether for modules/directories or files. The calls to Pylint … Read more

Pylint can’t find SQLAlchemy query member

Solution pip install pylint-flask pip install pylint-flask-sqlalchemy Load the installed plugin. For example, if you use VS code, please edit settings.json file as follows: “python.linting.pylintArgs”: [“–load-plugins”, “pylint_flask_sqlalchemy”, “pylint_flask”] Optional If having other warnings, define remaining members in generated-members in pylintrc file.

How to deal with Pylint’s “too-many-instance-attributes” message?

A linter’s job is to make you aware of potential issues with your code, and as you say in your question, it should not have the last word. If you’ve considered what pylint has to say and decided that for this class, the attributes you have are appropriate (which seems reasonable to me), you can … Read more

Python: avoiding Pylint warnings about too many arguments

First, one of Perlis’s epigrams: “If you have a procedure with 10 parameters, you probably missed some.” Some of the 10 arguments are presumably related. Group them into an object, and pass that instead. Making an example up, because there’s not enough information in the question to answer directly: class PersonInfo(object): def __init__(self, name, age, … Read more