Skip to content

Lint configuration followup #22123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ RET=0

if [ "$LINT" ]; then

# We're ignoring the following codes across the board
#E402, # module level import not at top of file
#E731, # do not assign a lambda expression, use a def
#E741, # do not use variables named 'l', 'O', or 'I'
#W503, # line break before binary operator
#C405, # Unnecessary (list/tuple) literal - rewrite as a set literal.
#C406, # Unnecessary (list/tuple) literal - rewrite as a dict literal.
#C408, # Unnecessary (dict/list/tuple) call - rewrite as a literal.
#C409, # Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal).
#C410 # Unnecessary (list/tuple) passed to list() - (remove the outer call to list()/rewrite as a list literal).

# pandas/_libs/src is C code, so no need to search there.
echo "Linting *.py"
flake8 pandas --filename=*.py --exclude pandas/_libs/src --ignore=C405,C406,C408,C409,C410,E402,E731,E741,W503
Expand Down
3 changes: 2 additions & 1 deletion ci/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# This file was autogenerated by scripts/convert_deps.py
# Do not modify directly
Cython
Cython>=0.28.2
NumPy
flake8
flake8-comprehensions
moto
pytest>=3.1
python-dateutil>=2.5.0
Expand Down
7 changes: 6 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ ignore =
E402, # module level import not at top of file
E731, # do not assign a lambda expression, use a def
E741, # do not use variables named 'l', 'O', or 'I'
W503 # line break before binary operator
W503, # line break before binary operator
C405, # Unnecessary (list/tuple) literal - rewrite as a set literal.
C406, # Unnecessary (list/tuple) literal - rewrite as a dict literal.
C408, # Unnecessary (dict/list/tuple) call - rewrite as a literal.
C409, # Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal).
C410 # Unnecessary (list/tuple) passed to list() - (remove the outer call to list()/rewrite as a list literal).
max-line-length = 79

[yapf]
Expand Down