8

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

m.raynal
  • 257
  • 3
  • 9

1 Answers1

9

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.

Jesse
  • 1,984
  • 11
  • 19