My project uses a width of 4 spaces for indentation.
However, running flake8 on it yields warnings that say that expected tab/indentation width was 2 spaces.
How do I configure flake8 to correctly accept 4 spaces for indentation?
class Foo(object):
bar = True
Above mentioned is my (over simplified) code fragment flake8 flags line #2 with a warning saying:
[W0311] Bad indentation. Found 4 spaces, expected 2
I am using vim with flake8 plugin.
In my .pylintrc
:
[FORMAT]
indent-string=' '
However, I am not sure how .pylintrc
even comes into picture, since the linting is done by the flake8 vim plugin
W0311
is actually a pylint warning (source). How do you run it? Do you have.pylintrc
in your project directory? – Evangelista.pylintrc
config. Thanks again! – Her