From: John Mulligan Date: Wed, 16 Aug 2023 18:05:59 +0000 (-0400) Subject: cephadm: update tox.ini flake8 rules X-Git-Tag: v19.0.0~561^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c12ea76e47461a8b0254666f8babc9aa03acd57e;p=ceph.git cephadm: update tox.ini flake8 rules 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 Pair-programmed-with: Adam King Co-authored-by: Adam King --- diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index d511834315fb..10f8743abc9d 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -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.