Skip to content

Commit

Permalink
travis: Run flake8 only on Python 2.7
Browse files Browse the repository at this point in the history
flake8 has major problems on 2.6, 3.2, and 3.3: See https://travis-ci.org/phihag/ipaddress/jobs/599423233 and https://travis-ci.org/phihag/ipaddress/jobs/599423234 for examples.
  • Loading branch information
phihag committed Oct 18, 2019
1 parent f92edc4 commit 724c9d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ python:
- "pypy"
- "pypy3"
install:
- "pip install flake8"
- "if python --version 2>&1 | grep -q ' 2\.7\.'; then pip install flake8 ; fi"
script:
- "make test"
- "make lint"
- "make lint-if-2.7"
notifications:
email:
- [email protected]
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ test:
python test_ipaddress.py

lint:
@(python --version 2>&1 | grep -q ' 2\.6\.') || flake8 ipaddress.py test_ipaddress.py
flake8 *.py

lint-if-2.7:
@if python --version 2>&1 | grep -q ' 2\.7\.'; then $(MAKE) lint ; fi

pypi:
python setup.py sdist bdist_wheel upload
Expand Down Expand Up @@ -38,5 +41,5 @@ docker-test-3.3:
clean:
rm -rf -- build dist ipaddress.egg-info

.PHONY: default test clean pypi lint docker-test-all docker-test-2.6 docker-test-2.7 docker-test-3.2 docker-test-3.3
.PHONY: default test clean pypi lint docker-test-all docker-test-2.6 docker-test-2.7 docker-test-3.2 docker-test-3.3 lint-if-2.7

0 comments on commit 724c9d9

Please sign in to comment.