5

I'm using elpy to code in Python, along with flymake to help with style/syntax checking.

The problem being that I have my habit, and I like to sometimes put 2 blank lines between methods of the same class, which inevitably triggers the following :

E303 : too many blank lines (2).

Now I'd like, or to have flymake ignore this specific error, or to edit the file where these rules are written, to trigger for instance a warning from 3 blank lines, and not 2.

How could I do that ?

Thanks.

Edit : I'm using GNU emacs 24.5.1 on Ubuntu 16.04

7

flymake uses flake8 to check the errors, so you have to tell flake8 which errors you don't want to see. You can do that globally by creating the file ~/.config/flake8, with the following content:

[flake8]
ignore = E303

You can also create a setup.cfg at the root of your project, with the same syntax, to have different settings per project.

Make sure to restart flymake after changing flake's config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.