From d894667b00404c07f13d3085d8b09b98e8e87aa2 Mon Sep 17 00:00:00 2001 From: Viktor Ahlqvist Date: Tue, 3 Aug 2021 14:29:24 +0200 Subject: [PATCH] Improve tox config and add isort formatter --- tox.ini | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index f15f4ca..8cc9759 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist= black, + sort, lint, py36, py37, @@ -8,20 +9,29 @@ envlist= py39, [testenv] +; SQL Alchemy 2.0 migration +setenv = SQLALCHEMY_WARN_20=1 deps = -rrequirements-dev.txt commands = coverage erase - pytest --junitxml=test-reports/junit.xml --cov={toxinidir}/comet --cov={toxinidir}/comet_core/ --cov-report=term --cov-report=xml:test-reports/cobertura.xml {toxinidir}/tests/ + pytest --junitxml=test-reports/junit.xml --cov={toxinidir}/comet_core/ --cov-report=term --cov-report=xml:test-reports/cobertura.xml {toxinidir}/tests/ -[testenv:black] +[testenv:format] basepython = python3.6 deps = -rrequirements-dev.txt skip_install = true commands = - black . --diff --check + python3 -m black --diff --check {toxinidir}/comet_core/ {toxinidir}/tests + +[testenv:isort] +basepython = python3.6 +deps = -rrequirements-dev.txt +skip_install = true +commands = + python3 -m isort --diff --check-only {toxinidir}/comet_core/ {toxinidir}/tests [testenv:lint] basepython = python3.6 deps = -rrequirements-dev.txt commands = - pylint --rcfile={toxinidir}/.pylintrc comet_core + python3 -m pylint --rcfile={toxinidir}/.pylintrc {toxinidir}/comet_core {toxinidir}/tests