@@ -10,42 +10,42 @@ if [ "$LINT" ]; then
10
10
11
11
# pandas/_libs/src is C code, so no need to search there.
12
12
echo " Linting *.py"
13
- flake8 pandas --filename=* .py --exclude pandas/_libs/src
13
+ flake8 pandas --filename=* .py --exclude pandas/_libs/src --ignore=C405,C406,C408,C409,C410,E402,E731,E741,W503
14
14
if [ $? -ne " 0" ]; then
15
15
RET=1
16
16
fi
17
17
echo " Linting *.py DONE"
18
18
19
19
echo " Linting setup.py"
20
- flake8 setup.py
20
+ flake8 setup.py --ignore=C405,C406,C408,C409,C410,E402,E731,E741,W503
21
21
if [ $? -ne " 0" ]; then
22
22
RET=1
23
23
fi
24
24
echo " Linting setup.py DONE"
25
25
26
26
echo " Linting asv_bench/benchmarks/"
27
- flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/* .py --ignore=F811
27
+ flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/* .py --ignore=F811,C405,C406,C408,C409,C410
28
28
if [ $? -ne " 0" ]; then
29
29
RET=1
30
30
fi
31
31
echo " Linting asv_bench/benchmarks/*.py DONE"
32
32
33
33
echo " Linting scripts/*.py"
34
- flake8 scripts --filename=* .py
34
+ flake8 scripts --filename=* .py --ignore=C405,C406,C408,C409,C410,E402,E731,E741,W503
35
35
if [ $? -ne " 0" ]; then
36
36
RET=1
37
37
fi
38
38
echo " Linting scripts/*.py DONE"
39
39
40
40
echo " Linting doc scripts"
41
- flake8 doc/make.py doc/source/conf.py
41
+ flake8 doc/make.py doc/source/conf.py --ignore=C405,C406,C408,C409,C410,E402,E731,E741,W503
42
42
if [ $? -ne " 0" ]; then
43
43
RET=1
44
44
fi
45
45
echo " Linting doc scripts DONE"
46
46
47
47
echo " Linting *.pyx"
48
- 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
48
+ 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,C407,C411
49
49
if [ $? -ne " 0" ]; then
50
50
RET=1
51
51
fi
@@ -131,19 +131,6 @@ if [ "$LINT" ]; then
131
131
fi
132
132
echo " Check for non-standard imports DONE"
133
133
134
- echo " Check for use of lists instead of generators in built-in Python functions"
135
-
136
- # Example: Avoid `any([i for i in some_iterator])` in favor of `any(i for i in some_iterator)`
137
- #
138
- # Check the following functions:
139
- # any(), all(), sum(), max(), min(), list(), dict(), set(), frozenset(), tuple(), str.join()
140
- grep -R --include=" *.py*" -E " [^_](any|all|sum|max|min|list|dict|set|frozenset|tuple|join)\(\[.* for .* in .*\]\)" pandas
141
-
142
- if [ $? = " 0" ]; then
143
- RET=1
144
- fi
145
- echo " Check for use of lists instead of generators in built-in Python functions DONE"
146
-
147
134
echo " Check for incorrect sphinx directives"
148
135
SPHINX_DIRECTIVES=$( echo \
149
136
" autosummary|contents|currentmodule|deprecated|function|image|" \
0 commit comments