File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ install:
1111 - pip install -r requirements-dev.txt
1212 # mypy can't be installed on pypy
1313 - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install mypy ; fi
14+ - if [[ "${TRAVIS_PYTHON_VERSION}" != *"3.5"* ]] ; then pip install black ; fi
1415script :
1516 - make ci
1617after_success :
Original file line number Diff line number Diff line change 11.PHONY : all virtualenv
22MAX_LINE_LENGTH =110
33PYTHON_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]) ")
45
56LINT_TARGETS: =flake8
7+
68ifneq ($(findstring PyPy,$(PYTHON_IMPLEMENTATION ) ) ,PyPy)
79 LINT_TARGETS:=$(LINT_TARGETS) mypy
810endif
11+ ifneq ($(findstring 3.5,$(PYTHON_VERSION ) ) ,3.5)
12+ LINT_TARGETS:=$(LINT_TARGETS) black_check
13+ endif
914
1015
1116virtualenv : ./env/requirements.built
@@ -26,6 +31,10 @@ lint: $(LINT_TARGETS)
2631flake8 :
2732 flake8 --max-line-length=$(MAX_LINE_LENGTH ) examples * .py
2833
34+ .PHONY : black_check
35+ black_check :
36+ black --check .
37+
2938mypy :
3039 mypy examples/* .py test_zeroconf.py zeroconf.py
3140
You can’t perform that action at this time.
0 commit comments