[PATCH 03 of 11 logilab-common] [black] add black to tox file based on yams black integration

Laurent Peuch cortex at worlddomination.be
Wed Apr 1 16:20:04 CEST 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1584556978 -3600
#      Wed Mar 18 19:42:58 2020 +0100
# Node ID 619070abee7c1d40c6555024b34547e60882ec74
# Parent  9936478e069dbd23308cb30e4c8e7601e89065cd
# Available At https://hg.logilab.org/users/lpeuch/logilab-common
#              hg pull https://hg.logilab.org/users/lpeuch/logilab-common -r 619070abee7c
# EXP-Topic types-annotations-and-cleaning
[black] add black to tox file based on yams black integration

diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
--- /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
--- 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 .




More information about the cubicweb-devel mailing list