Skip to content

Commit

Permalink
Fix tox (pyupgrade requires bash)
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed May 19, 2024
1 parent e2d5713 commit 91a0731
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91a0731

Please sign in to comment.