summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Holman <brett.holman@canonical.com>2022-06-30 13:08:36 -0600
committerGitHub <noreply@github.com>2022-06-30 14:08:36 -0500
commit0501262cebaaf501d90c55bb399c0637de088e9c (patch)
tree8d999aa4b659b77b4e1f0a3a9e40fca7ad2426bf
parente1006a7963095fad851ed7e0ae19a25483d822fb (diff)
downloadcloud-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--Makefile6
-rw-r--r--tox.ini25
2 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 12c254c9..72faa04a 100644
--- a/Makefile
+++ b/Makefile
@@ -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' \
diff --git a/tox.ini b/tox.ini
index 43401e8e..26588585 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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