]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: update tox.ini flake8 rules
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 16 Aug 2023 18:05:59 +0000 (14:05 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 30 Aug 2023 14:10:50 +0000 (10:10 -0400)
Add cephadmlib to flake8 checks.
Use `git ls-files` like src/pybind/mgr/tox.ini does for listing certain
python files.

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 d511834315fbb117af2423261604cdf3e6235250..10f8743abc9dfe0ddf665113d578e9f759adc1e2 100644 (file)
@@ -61,8 +61,8 @@ deps =
     flake8 == 5.0.4
     flake8-quotes
 commands =
-    flake8 --config=tox.ini {posargs:cephadm.py}
-    bash -c "test $(grep -c 'docker.io' cephadm.py) == 11"
+    flake8 --config=tox.ini {posargs:cephadm.py cephadmlib}
+    bash -c 'test $(git ls-files 'cephadm.py' 'cephadmlib/*.py' | xargs grep "docker.io" | wc -l) == 11'
 # Downstream distributions may choose to alter this "docker.io" number,
 # to make sure no new references to docker.io are creeping in unnoticed.