| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,6 +11,7 @@ install: | |||
| 11 | 11 | - pip install -r requirements-dev.txt | |
| 12 | 12 | # mypy can't be installed on pypy | |
| 13 | 13 | - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install mypy ; fi | |
| 14 | + - if [[ "${TRAVIS_PYTHON_VERSION}" != *"3.5"* ]] ; then pip install black ; fi | ||
| 14 | 15 | script: | |
| 15 | 16 | - make ci | |
| 16 | 17 | after_success: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,16 @@ | |||
| 1 | 1 | .PHONY: all virtualenv | |
| 2 | 2 | MAX_LINE_LENGTH=110 | |
| 3 | 3 | PYTHON_IMPLEMENTATION:=$(shell python -c "import sys;import platform;sys.stdout.write(platform.python_implementation())") | |
| 4 | + PYTHON_VERSION:=$(shell python -c "import sys;sys.stdout.write('%d.%d' % sys.version_info[:2])") | ||
| 4 | 5 | ||
| 5 | 6 | LINT_TARGETS:=flake8 | |
| 7 | + | ||
| 6 | 8 | ifneq ($(findstring PyPy,$(PYTHON_IMPLEMENTATION)),PyPy) | |
| 7 | 9 | LINT_TARGETS:=$(LINT_TARGETS) mypy | |
| 8 | 10 | endif | |
| 11 | + ifneq ($(findstring 3.5,$(PYTHON_VERSION)),3.5) | ||
| 12 | + LINT_TARGETS:=$(LINT_TARGETS) black_check | ||
| 13 | + endif | ||
| 9 | 14 | ||
| 10 | 15 | ||
| 11 | 16 | virtualenv: ./env/requirements.built | |
@@ -26,6 +31,10 @@ lint: $(LINT_TARGETS) | |||
| 26 | 31 | flake8: | |
| 27 | 32 | flake8 --max-line-length=$(MAX_LINE_LENGTH) examples *.py | |
| 28 | 33 | ||
| 34 | + .PHONY: black_check | ||
| 35 | + black_check: | ||
| 36 | + black --check . | ||
| 37 | + | ||
| 29 | 38 | mypy: | |
| 30 | 39 | mypy examples/*.py test_zeroconf.py zeroconf.py | |
| 31 | 40 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments