← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/lpcraft:tox-setup-cfg-fmt into lpcraft:main

 

Colin Watson has proposed merging ~cjwatson/lpcraft:tox-setup-cfg-fmt into lpcraft:main.

Commit message:
Move setup-cfg-fmt to a non-default tox environment

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/lpcraft/+git/lpcraft/+merge/411939

This is very slow (about 11 seconds on my system), which is a bit much by comparison with the other fast linters in pre-commit hooks.  I filed https://github.com/pre-commit/identify/issues/251 about the slowness, but in the meantime let's move it to a non-default environment so that it's less annoying.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lpcraft:tox-setup-cfg-fmt into lpcraft:main.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 10ba4de..7de2d0e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -23,7 +23,3 @@ repos:
     rev: 21.10b0
     hooks:
     -   id: black
--   repo: https://github.com/asottile/setup-cfg-fmt
-    rev: v1.19.0
-    hooks:
-    -   id: setup-cfg-fmt
diff --git a/tox.ini b/tox.ini
index f111197..5f4f7ba 100644
--- a/tox.ini
+++ b/tox.ini
@@ -45,3 +45,12 @@ commands =
     coverage erase
     coverage run -m pytest
     coverage report -m  --fail-under=80
+
+[testenv:setup-cfg-fmt]
+basepython =
+    python3.8
+deps =
+    setup-cfg-fmt
+skip_install = true
+commands =
+    setup-cfg-fmt setup.cfg