Skip to content

Commit 852c7cf

Browse files
committed
Minimal flake8 config
This disable most common issues that are not critical like whitespace, at least for now, so that we can fix all the issues and put flake8 in CI with an exist status. Then we can decide to renable (or not) those checks.
1 parent b2f1a79 commit 852c7cf

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

setup.cfg

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,34 @@ license_file = COPYING.md
88
warningfilters= default |.* |DeprecationWarning |ipykernel.*
99
error |.*invalid.* |DeprecationWarning |matplotlib.*
1010

11-
11+
[flake8]
12+
# References:
13+
# https://flake8.readthedocs.io/en/latest/user/configuration.html
14+
# https://flake8.readthedocs.io/en/latest/user/error-codes.html
15+
# https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
16+
exclude = __init__.py,versioneer.py
17+
ignore =
18+
E20, # Extra space in brackets
19+
E122, # continuation line missing indentation or outdented
20+
E124, # closing bracket does not match visual indentation
21+
E128,E127,E126 # continuation line over/under-indented for visual indent
22+
E121,E125, # continuation line with same indent as next logical line
23+
E226, # missing whitespace around arithmetic operator
24+
E231,E241, # Multiple spaces around ","
25+
E211, # whitespace before '('
26+
E221,E225,E228 # missing whitespace around operator
27+
E271, # multiple spaces after keyword
28+
E301,E303,E305,E306 # expected X blank lines
29+
E26, # Comments
30+
E251 # unexpected spaces around keyword / parameter equals
31+
E302 # expected 2 blank lines, found 1
32+
E4, # Import formatting
33+
E721, # Comparing types instead of isinstance
34+
E731, # Assigning lambda expression
35+
E741, # Ambiguous variable names
36+
W293, # blank line contains whitespace
37+
W503, # line break before binary operator
38+
W504, # line break after binary operator
39+
F811, # redefinition of unused 'loop' from line 10
40+
max-line-length = 120
41+

0 commit comments

Comments
 (0)