pythonpep8pycodestyle

pycodestyle: Ignore directives project-wise


Is there a way to configure a python project to ignore specific pycodestyle directives project-wise?

i.e. adding a file in the likes of say .pycodeignore in the project's root with entries like:

E302
E266

etc?


Solution

  • According to the configuration docs, you can create a file called setup.cfg or tox.ini in the root of your project and write the following:

    [pycodestyle]
    ignore = E226,E302