summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyproject.toml15
-rw-r--r--tox.ini16
2 files changed, 30 insertions, 1 deletions
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..6071524
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,15 @@
+[tool.black]
+line-length = 100
+target-version = ['py37']
+exclude = '''(
+ \(
+ dist
+ | docs
+ | \.tox
+ | \.hg
+ | \.mypy_cache
+ | \.pytest_cache
+ | __pycache__
+ | logilab_common.egg-info
+ \)
+)'''
diff --git a/tox.ini b/tox.ini
index fb24e02..63fe6f8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist=py3,mypy
+envlist=py3,mypy,black,black-run
[testenv]
deps =
@@ -19,3 +19,17 @@ commands=
deps =
mypy >= 0.761
commands = mypy --ignore-missing-imports logilab
+
+[testenv:black]
+basepython = python3
+skip_install = true
+deps =
+ black >= 19.10b0
+commands = black --check .
+
+[testenv:black-run]
+basepython = python3
+skip_install = true
+deps =
+ black >= 19.10b0
+commands = black .