summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Peuch <cortex@worlddomination.be>2020-03-18 19:42:58 +0100
committerLaurent Peuch <cortex@worlddomination.be>2020-03-18 19:42:58 +0100
commit8a910e9cb137ae04e9ad570adc46fa7104a5d9ab (patch)
tree6ea34784c0ba529ed2b358d6167a82366af8104b
parent5c3c1a5dd8ccea45cce331e07c5ca39a63b51660 (diff)
downloadlogilab-common-8a910e9cb137ae04e9ad570adc46fa7104a5d9ab.tar.gz
[black] add black to tox file based on yams black integration
-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 .