added black for lint check
This commit is contained in:
parent
aa9bf04dfe
commit
272f6e195d
4
setup.cfg
Normal file
4
setup.cfg
Normal file
|
@ -0,0 +1,4 @@
|
|||
[flake8]
|
||||
# https://github.com/ambv/black#slices
|
||||
# https://github.com/ambv/black#line-breaks--binary-operators
|
||||
ignore = E203, W503
|
2
setup.py
2
setup.py
|
@ -21,7 +21,7 @@ def open_local(paths, mode='r', encoding='utf8'):
|
|||
|
||||
with open_local(['sanic', '__init__.py'], encoding='latin1') as fp:
|
||||
try:
|
||||
version = re.findall(r"^__version__ = '([^']+)'\r?$",
|
||||
version = re.findall(r"^__version__ = \"([^']+)\"\r?$",
|
||||
fp.read(), re.M)[0]
|
||||
except IndexError:
|
||||
raise RuntimeError('Unable to determine version.')
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py35, py36, py37, {py35,py36,py37}-no-ext, flake8, check
|
||||
envlist = py35, py36, py37, {py35,py36,py37}-no-ext, lint, check
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
|
@ -21,12 +21,14 @@ commands =
|
|||
- coverage combine --append
|
||||
coverage report -m
|
||||
|
||||
[testenv:flake8]
|
||||
[testenv:lint]
|
||||
deps =
|
||||
flake8
|
||||
black
|
||||
|
||||
commands =
|
||||
flake8 sanic
|
||||
black --check --verbose sanic
|
||||
|
||||
[testenv:check]
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue
Block a user