Skip to content

Commit

Permalink
Go back to full PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
William de Vazelhes committed Jul 31, 2019
1 parent d91bbba commit 383a903
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ matrix:
before_install:
- pip install flake8
script:
- source ./build_tools/travis/flake8_diff.sh;
- flake8 --extend-ignore=E111,E114 --show-source;
# Use this instead to have a syntax check only on the diff:
# - source ./build_tools/travis/flake8_diff.sh;
6 changes: 6 additions & 0 deletions build_tools/travis/flake8_diff.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is not used yet but we keep it in case we need to check the pep8 difference
# on the diff (see .travis.yml)
#
#!/bin/bash
# copied-pasted and adapted from http://github.com/sklearn-contrib/imbalanced-learn
# (more precisely: https://raw.githubusercontent.com/glemaitre/imbalanced-learn
Expand Down Expand Up @@ -116,6 +119,9 @@ echo -e '\nRunning flake8 on the diff in the range' "$COMMIT_RANGE" \
"($(git rev-list $COMMIT_RANGE | wc -l) commit(s)):"
echo '--------------------------------------------------------------------------------'

# to not include the context (some lines before and after the modified lines), add the
# flag --unified=0 (warning: it will not include some errors like for instance adding too
# much blank lines
check_files() {
git diff $COMMIT_RANGE | flake8 --diff --show-source --extend-ignore=E111,E114
}
Expand Down

0 comments on commit 383a903

Please sign in to comment.