Skip to content

Commit fe3a73b

Browse files
rthlesteve
authored andcommitted
[MRG] MNT Use the default flake8 --ignore options (scikit-learn#9123)
1 parent f0c5568 commit fe3a73b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build_tools/travis/flake8_diff.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,12 @@ check_files() {
137137
if [[ "$MODIFIED_FILES" == "no_match" ]]; then
138138
echo "No file outside sklearn/externals and doc/sphinxext/sphinx_gallery has been modified"
139139
else
140-
check_files "$(echo "$MODIFIED_FILES" | grep -v ^examples)" --ignore=W503
140+
# Default ignore PEP8 violations are from flake8 3.3.0
141+
DEFAULT_IGNORED_PEP8=E121,E123,E126,E226,E24,E704,W503,W504
142+
check_files "$(echo "$MODIFIED_FILES" | grep -v ^examples)" \
143+
--ignore $DEFAULT_IGNORED_PEP8
141144
# Examples are allowed to not have imports at top of file
142-
check_files "$(echo "$MODIFIED_FILES" | grep ^examples)" --ignore=E402,W503
145+
check_files "$(echo "$MODIFIED_FILES" | grep ^examples)" \
146+
--ignore $DEFAULT_IGNORED_PEP8 --ignore E402
143147
fi
144148
echo -e "No problem detected by flake8\n"

0 commit comments

Comments
 (0)