From 0d1398a84f2827a58577d594eccd1464951e0d06 Mon Sep 17 00:00:00 2001 From: "(Venkat) Raghav (Rajagopalan)" Date: Wed, 28 Dec 2016 22:00:13 +0100 Subject: [PATCH] MNT Ignore E731: Use a def instead of lambda We don't follow this and lambdas are quite common in the scientific programming world. Our contributors will more often use lambdas compared to diff for one-liners... --- build_tools/travis/flake8_diff.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/travis/flake8_diff.sh b/build_tools/travis/flake8_diff.sh index 408580554b993..3a3f013318a94 100755 --- a/build_tools/travis/flake8_diff.sh +++ b/build_tools/travis/flake8_diff.sh @@ -134,8 +134,8 @@ check_files() { if [[ "$MODIFIED_FILES" == "no_match" ]]; then echo "No file outside sklearn/externals and doc/sphinxext/sphinx_gallery has been modified" else - check_files "$(echo "$MODIFIED_FILES" | grep -v ^examples)" + check_files "$(echo "$MODIFIED_FILES" | grep -v ^examples)" --ignore=E731 # Examples are allowed to not have imports at top of file - check_files "$(echo "$MODIFIED_FILES" | grep ^examples)" --ignore=E402 + check_files "$(echo "$MODIFIED_FILES" | grep ^examples)" --ignore=E402,E731 fi echo -e "No problem detected by flake8\n"