Description
Description
The flake8 Travis CI build currently runs flake8 --ignore=W503 <files>
on modified (non example) files. This is much stricter than the defaults which are --ignore=E121,E123,E126,E226,E24,E704,W503,W504
in the latest flake8 verison. This leads to an inefficient contribution workflow (and sometimes non PEP8 compatible style). Also related to @GaelVaroquaux observations about it during the last sprint.
What do you think @lesteve ?
Steps/Code to Reproduce
flake8_example.py
x, y = 2, 3
x = x*2 - 1
hypot2 = x*x + y*y
- Run
flake8 flake8_example.py
=> everything looks OK. - Make a PR with this code to scikit-learn. Wait 20min. See the Travis CI flake8 build fail (e.g. in [MRG+1] Add text vectorizers benchmarks #9086).
- Rerun
flake8
on your machine => still looks OK. Install the same version of flake8 => still no errors - Start reading through
scikit-learn/build_tools/travis/flake8_diff.sh
- Wonder why it fails, read through related flake8 issues
Expected Results
No errors, since this is valid PEP8 code taken from https://www.python.org/dev/peps/pep-0008/#other-recommendations.
I understand that less strict settings, might mean potentially more comments during PR reviews. At least; when Travis CI fails due to flake8 it should print the settings of flake8 that were used.
Actual Results
Some lost contributors time.
Versions
master
scikit-learn branch, flake8 3.3.0