From 91a0731c218b96e46db9edae077ea6dcd435b2f4 Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 19 May 2024 12:23:06 +0200 Subject: [PATCH] Fix tox (pyupgrade requires bash) --- tox.ini | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index 0af1fee..654ff3c 100644 --- a/tox.ini +++ b/tox.ini @@ -109,21 +109,30 @@ commands = [testenv:format] description = Reformat python code using Black and isort -# skip_install = true deps = {[testenv:check]deps} - pyupgrade -allowlist_externals: - bash changedir = {toxinidir} commands = - bash -ec 'pyupgrade --py37-plus --exit-zero-even-if-changed wsgidav/*.py tests/*.py setup.py' ruff check --fix wsgidav tests setup.py isort --profile black wsgidav tests setup.py {posargs} black wsgidav tests setup.py {[testenv:lint]commands} +[testenv:upgrade] +description = Upgrade Python syntax to least supported version +deps = + {[testenv:format]deps} + pyupgrade +allowlist_externals: + bash +changedir = {toxinidir} +commands = + # Needs bash-style file pattern expansion: + bash -ec 'pyupgrade --py37-plus --exit-zero-even-if-changed wsgidav/*.py tests/*.py setup.py' + {[testenv:format]commands} + + [testenv:docs] description = Build Sphinx documentation (output directory: docs/sphinx-build) changedir = docs