[tox]
-envlist = lint, rstcheck, mypy, py3
+envlist = lint, rstcheck, mypy, py3, check-black
skip_missing_interpreters = true
[testenv:py3]
rstcheck
commands =
rstcheck --report-level info README.rst
+
+
+# OPT-IN formatting with 'black'
+# add your module to the modules list below to use automated formatting
+[black]
+deps = black>=23,<25
+options = -l78 -t py36 --skip-string-normalization
+modules = ceph/cephadm ceph/cryptotools ceph/fs ceph/utils.py
+
+[testenv:check-black]
+deps = {[black]deps}
+commands =
+ black --check -q {[black]options} {[black]modules}
+
+[testenv:format-black]
+deps = {[black]deps}
+commands =
+ black {[black]options} {[black]modules}