Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a8fee9

Browse files
committed
Small tweak
1 parent 0c57a67 commit 1a8fee9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build_tools/travis/flake8_diff.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +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-
# Running flake8 with the default --ignore options
140+
# Default ignore PEP8 violations are from flake8 3.3.0
141+
DEFAULT_IGNORED_PEP8=E121,E123,E126,E226,E24,E704,W503,W504
141142
check_files "$(echo "$MODIFIED_FILES" | grep -v ^examples)" \
142-
--ignore=E121,E123,E126,E226,E24,E704,W503,W504
143+
--ignore $DEFAULT_IGNORED_PEP8
143144
# Examples are allowed to not have imports at top of file
144145
check_files "$(echo "$MODIFIED_FILES" | grep ^examples)" \
145-
--ignore=E402,E121,E123,E126,E226,E24,E704,W503,W504
146+
--ignore $DEFAULT_IGNORED_PEP8 --ignore E402
146147
fi
147148
echo -e "No problem detected by flake8\n"

0 commit comments

Comments
 (0)