I use flake8
for linting and black
for formatting.
flake8
produces warnings on execution rules and formatting rules:
I only want to see execution rules. I don't care about formatting rules because they'll automatically get fixed by black
formatting:
I can disable these rules one at a time by running flake8 --ignore=E271,E225,W291,E231
. However, there's no exhaustive list of formatting rules to disable, they have to be discovered one at a time. It would be great to have something similar to JavaScript's eslint, where there's a plugin to disable all formatting rules that are covered by the code formatter.
Is there a similar way to disable all the formatting rules in flake8
?
Solution: Based on the below answer, I ended up ignoring all formatting rules with this command:
flake8 --ignore=E101,E111,E114,E115,E116,E117,E12,E13,E2,E3,E401,E5,E70,W1,W2,W3,W5 file.py