diff options
author | Brett Holman <brett.holman@canonical.com> | 2022-06-30 13:08:36 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 14:08:36 -0500 |
commit | 0501262cebaaf501d90c55bb399c0637de088e9c (patch) | |
tree | 8d999aa4b659b77b4e1f0a3a9e40fca7ad2426bf | |
parent | e1006a7963095fad851ed7e0ae19a25483d822fb (diff) | |
download | cloud-init-git-0501262cebaaf501d90c55bb399c0637de088e9c.tar.gz |
tox: add unpinned env for do_format and check_format (#1554)
Add make helpers to do and check fmt
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | tox.ini | 25 |
2 files changed, 31 insertions, 0 deletions
@@ -128,6 +128,12 @@ deb-src: doc: tox -e doc +fmt: + tox -e do_format && tox -e check_format + +fmt-tip: + tox -e do_format_tip && tox -e check_format_tip + # Spell check && filter false positives _CHECK_SPELLING := find doc -type f -exec spellintian {} + | \ grep -v -e 'doc/rtd/topics/cli.rst: modules modules' \ @@ -80,6 +80,24 @@ commands = {[testenv:mypy]commands} {[testenv:pylint]commands} +[testenv:check_format_tip] +deps = + black + flake8 + isort + mypy + pylint + pytest + types-jsonschema + types-oauthlib + types-pyyaml + types-requests + types-setuptools + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/integration-requirements.txt +commands = + {[testenv:check_format]commands} + [testenv:do_format] deps = black=={[format_deps]black} @@ -88,6 +106,13 @@ commands = {envpython} -m isort . {envpython} -m black . +[testenv:do_format_tip] +deps = + black + isort +commands = + {[testenv:do_format]commands} + [testenv:py3] deps = -r{toxinidir}/test-requirements.txt |