Skip to content

Commit 4ff6f3f

Browse files
cclaussrgbkrk
authored andcommitted
Use Flake8 to find Python syntax errors or undefined names
1 parent 829d6b4 commit 4ff6f3f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ install:
1717
- pip install -r dev-requirements.txt
1818
- pip install tornado
1919
- pip list
20+
before_script:
21+
- pip install flake8
22+
# stop the build if there are Python syntax errors or undefined names
23+
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
24+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
25+
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
2026
script:
2127
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then source activate testenv; fi
2228
- PYTHONPATH='.:tests' py.test -r s --cov-config .coveragerc --cov=cloudpickle

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Dependencies for running the tests with py.test
2+
flake8
23
pytest
34
pytest-cov
45
mock

0 commit comments

Comments
 (0)