diff --git a/tox.ini b/tox.ini index 52bdd9dbc..9e3678dc9 100644 --- a/tox.ini +++ b/tox.ini @@ -67,9 +67,12 @@ commands = -i "{toxinidir}/docs/src/examples" \ {[tox]lint_folders} "{toxinidir}/README.rst" -[testenv:format] -# Abuse tox to do actual formatting. Users can call `tox -e format` to run -# formatting on all files +[testenv:{format,format-unsafe}] +description = + format: Formats files in working directory. + format-unsafe: Formats files in working directory. Fixes more linter errors + but might alter code logic. Result of this formatting should + be double checked. skip_install = true deps = ruff @@ -77,7 +80,8 @@ deps = blackdoc isort commands = - ruff check --fix {[tox]lint_folders} + format: ruff check --fix {[tox]lint_folders} + format-unsafe: ruff check --fix --unsafe-fixes {[tox]lint_folders} black {[tox]lint_folders} blackdoc {[tox]lint_folders} isort {[tox]lint_folders}