]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
tox: Use pre-commit for pep8 environment
authorStephen Finucane <stephen@that.guru>
Tue, 1 Aug 2023 16:35:35 +0000 (17:35 +0100)
committerStephen Finucane <stephen@that.guru>
Tue, 1 Aug 2023 17:21:28 +0000 (18:21 +0100)
Avoid duplication.

Signed-off-by: Stephen Finucane <stephen@that.guru>
(cherry picked from commit dd8320a83873a1649adb0d78f35190ec61182b17)

tox.ini

diff --git a/tox.ini b/tox.ini
index 0ab0ab84736e147169e66d0303f12f19a3eb0f4d..4873866eda1b1c695bf005f9e9f0a3befd187f16 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -37,11 +37,9 @@ commands =
 
 [testenv:pep8]
 deps =
-    black
-    flake8
+    pre-commit
 commands =
-    black --check --quiet {posargs:patchwork manage.py}
-    flake8 {posargs:patchwork manage.py}
+    pre-commit run --all-files --show-diff-on-failure
 
 [flake8]
 # Some rules are ignored as their use makes the code more difficult to read: