|
9 | 9 |
|
10 | 10 | ### LINTING ###
|
11 | 11 |
|
12 |
| -# We're ignoring the following codes across the board |
13 |
| -# E402 module level import not at top of file |
14 |
| -# E731 do not assign a lambda expression, use a def |
15 |
| -# E741 do not use variables named 'l', 'O', or 'I' |
16 |
| -# W503 line break before binary operator |
17 |
| -# C406 Unnecessary (list/tuple) literal - rewrite as a dict literal. |
18 |
| -# C408 Unnecessary (dict/list/tuple) call - rewrite as a literal. |
19 |
| -# C409 Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal). |
20 |
| -# C410 Unnecessary (list/tuple) passed to list() - (remove the outer call to list()/rewrite as a list literal). |
| 12 | +# `setup.cfg` contains the list of error codes that are being ignored in flake8 |
21 | 13 |
|
22 | 14 | # pandas/_libs/src is C code, so no need to search there.
|
23 | 15 | MSG='Linting .py code' ; echo $MSG
|
24 |
| -flake8 pandas --filename=*.py --exclude pandas/_libs/src --ignore=C406,C408,C409,E402,E731,E741,W503 |
25 |
| -RET=$(($RET + $?)) ; echo $MSG "DONE" |
26 |
| - |
27 |
| -MSG='Linting .pyx code' ; echo $MSG |
28 |
| -flake8 pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126,E265,E305,E301,E127,E261,E271,E129,W291,E222,E241,E123,F403,C400,C401,C402,C403,C404,C405,C406,C407,C408,C409,C410,C411 |
29 |
| -RET=$(($RET + $?)) ; echo $MSG "DONE" |
30 |
| - |
31 |
| -MSG='Linting .pxd and .pxi.in' ; echo $MSG |
32 |
| -flake8 pandas/_libs --filename=*.pxi.in,*.pxd --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,F403 |
| 16 | +flake8 pandas --filename=*.py --exclude pandas/_libs/src |
33 | 17 | RET=$(($RET + $?)) ; echo $MSG "DONE"
|
34 | 18 |
|
35 | 19 | MSG='Linting setup.py' ; echo $MSG
|
36 |
| -flake8 setup.py --ignore=E402,E731,E741,W503 |
| 20 | +flake8 setup.py |
37 | 21 | RET=$(($RET + $?)) ; echo $MSG "DONE"
|
38 | 22 |
|
39 | 23 | MSG='Linting scripts' ; echo $MSG
|
40 |
| -flake8 scripts --filename=*.py --ignore=C408,E402,E731,E741,W503 |
| 24 | +flake8 scripts --filename=*.py |
41 | 25 | RET=$(($RET + $?)) ; echo $MSG "DONE"
|
42 | 26 |
|
43 | 27 | MSG='Linting asv benchmarks' ; echo $MSG
|
44 |
| -flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/*.py --ignore=F811,C406,C408,C409,C410 |
| 28 | +flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/*.py |
45 | 29 | RET=$(($RET + $?)) ; echo $MSG "DONE"
|
46 | 30 |
|
47 | 31 | MSG='Linting doc scripts' ; echo $MSG
|
48 |
| -flake8 doc/make.py doc/source/conf.py --ignore=E402,E731,E741,W503 |
| 32 | +flake8 doc/make.py doc/source/conf.py |
| 33 | +RET=$(($RET + $?)) ; echo $MSG "DONE" |
| 34 | + |
| 35 | +MSG='Linting .pyx code' ; echo $MSG |
| 36 | +flake8 pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126,E265,E305,E301,E127,E261,E271,E129,W291,E222,E241,E123,F403,C400,C401,C402,C403,C404,C405,C406,C407,C408,C409,C410,C411 |
| 37 | +RET=$(($RET + $?)) ; echo $MSG "DONE" |
| 38 | + |
| 39 | +MSG='Linting .pxd and .pxi.in' ; echo $MSG |
| 40 | +flake8 pandas/_libs --filename=*.pxi.in,*.pxd --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,F403 |
49 | 41 | RET=$(($RET + $?)) ; echo $MSG "DONE"
|
50 | 42 |
|
51 | 43 | # readability/casting: Warnings about C casting instead of C++ casting
|
|
0 commit comments