From 5cf53d006d8c6af1d26e89862dda0641456724f8 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Thu, 10 Aug 2023 09:46:27 -0400 Subject: [PATCH] cephadm: prepare for using black code formatting for cephadmlib 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 Pair-programmed-with: Adam King Co-authored-by: Adam King --- src/cephadm/tox.ini | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index 10f8743abc9..2845124afd4 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -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/ -- 2.39.5