]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: prepare for using black code formatting for cephadmlib
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 10 Aug 2023 13:46:27 +0000 (09:46 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 30 Aug 2023 14:10:50 +0000 (10:10 -0400)
Currently this is not checked/required but we'd like to use a consistent
formatting tool for the new files in cephadmlib. This let's us do so
incrementally.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Pair-programmed-with: Adam King <adking@redhat.com>
Co-authored-by: Adam King <adking@redhat.com>
src/cephadm/tox.ini

index 10f8743abc9dfe0ddf665113d578e9f759adc1e2..2845124afd403d2df1dca1eeb906237abe345198 100644 (file)
@@ -75,3 +75,15 @@ deps =
   pytest-cov
 commands =
   pytest -v --cov=cephadm --cov-report=term-missing --cov-report=html {posargs}
+
+[testenv:check-black]
+deps =
+    black>=23,<24
+commands =
+    black --check -l78 -t py36 --skip-string-normalization -v cephadmlib/
+
+[testenv:format-black]
+deps =
+    black>=23,<24
+commands =
+    black -q -l78 -t py36 --skip-string-normalization cephadmlib/