From 48440abbedccf3531a66d0eb90d978b66b3c6006 Mon Sep 17 00:00:00 2001 From: secwall Date: Sun, 1 Jan 2023 17:17:22 +0300 Subject: [PATCH] Reuse venv for linters to reduce setup time --- tox.ini | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tox.ini b/tox.ini index 12662b3..3d332b1 100644 --- a/tox.ini +++ b/tox.ini @@ -32,8 +32,12 @@ deps = behave coverage func_timeout -[testenv:flake8] -commands = flake8 pgmigrate.py setup.py +[testenv:{flake8,pylint,yapf}] +envdir = {toxworkdir}/.lint_env +commands = + flake8: flake8 pgmigrate.py setup.py + pylint: pylint pgmigrate.py + yapf: yapf -pd pgmigrate.py deps = flake8==5.0.4 flake8-string-format flake8-isort==5.0.0 @@ -41,14 +45,8 @@ deps = flake8==5.0.4 flake8-quotes flake8-copyright flake8-pep3101 - -[testenv:pylint] -commands = pylint pgmigrate.py -deps = pylint - -[testenv:yapf] -commands = yapf -pd pgmigrate.py -deps = yapf==0.32.0 + pylint + yapf==0.32.0 [flake8] copyright-check = True