| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,9 +12,6 @@ install: | |||
| 12 | 12 | # mypy can't be installed on pypy | |
| 13 | 13 | - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install mypy ; fi | |
| 14 | 14 | script: | |
| 15 | - - make test_coverage | ||
| 16 | - - flake8 --version | ||
| 17 | - - make flake8 | ||
| 18 | - - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then make mypy ; fi | ||
| 15 | + - make ci | ||
| 19 | 16 | after_success: | |
| 20 | 17 | - coveralls | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,12 @@ | |||
| 1 | 1 | .PHONY: all virtualenv | |
| 2 | 2 | MAX_LINE_LENGTH=110 | |
| 3 | + PYTHON_IMPLEMENTATION:=$(shell python -c "import sys;import platform;sys.stdout.write(platform.python_implementation())") | ||
| 4 | + | ||
| 5 | + LINT_TARGETS:=flake8 | ||
| 6 | + ifneq ($(findstring PyPy,$(PYTHON_IMPLEMENTATION)),PyPy) | ||
| 7 | + LINT_TARGETS:=$(LINT_TARGETS) mypy | ||
| 8 | + endif | ||
| 9 | + | ||
| 3 | 10 | ||
| 4 | 11 | virtualenv: ./env/requirements.built | |
| 5 | 12 | ||
@@ -10,6 +17,12 @@ env: | |||
| 10 | 17 | ./env/bin/pip install -r requirements-dev.txt | |
| 11 | 18 | cp requirements-dev.txt ./env/requirements.built | |
| 12 | 19 | ||
| 20 | + .PHONY: ci | ||
| 21 | + ci: test_coverage lint | ||
| 22 | + | ||
| 23 | + .PHONY: lint | ||
| 24 | + lint: $(LINT_TARGETS) | ||
| 25 | + | ||
| 13 | 26 | flake8: | |
| 14 | 27 | flake8 --max-line-length=$(MAX_LINE_LENGTH) examples *.py | |
| 15 | 28 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments