Skip to content

Commit 5768f33

Browse files
mroeschkevictor
authored and
victor
committed
Lint configuration followup (pandas-dev#22123)
1 parent cb31838 commit 5768f33

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

ci/lint.sh

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ RET=0
88

99
if [ "$LINT" ]; then
1010

11+
# We're ignoring the following codes across the board
12+
#E402, # module level import not at top of file
13+
#E731, # do not assign a lambda expression, use a def
14+
#E741, # do not use variables named 'l', 'O', or 'I'
15+
#W503, # line break before binary operator
16+
#C405, # Unnecessary (list/tuple) literal - rewrite as a set literal.
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).
21+
1122
# pandas/_libs/src is C code, so no need to search there.
1223
echo "Linting *.py"
1324
flake8 pandas --filename=*.py --exclude pandas/_libs/src --ignore=C405,C406,C408,C409,C410,E402,E731,E741,W503

ci/requirements_dev.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# This file was autogenerated by scripts/convert_deps.py
22
# Do not modify directly
3-
Cython
3+
Cython>=0.28.2
44
NumPy
55
flake8
6+
flake8-comprehensions
67
moto
78
pytest>=3.1
89
python-dateutil>=2.5.0

setup.cfg

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ ignore =
1616
E402, # module level import not at top of file
1717
E731, # do not assign a lambda expression, use a def
1818
E741, # do not use variables named 'l', 'O', or 'I'
19-
W503 # line break before binary operator
19+
W503, # line break before binary operator
20+
C405, # Unnecessary (list/tuple) literal - rewrite as a set literal.
21+
C406, # Unnecessary (list/tuple) literal - rewrite as a dict literal.
22+
C408, # Unnecessary (dict/list/tuple) call - rewrite as a literal.
23+
C409, # Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal).
24+
C410 # Unnecessary (list/tuple) passed to list() - (remove the outer call to list()/rewrite as a list literal).
2025
max-line-length = 79
2126

2227
[yapf]

0 commit comments

Comments
 (0)