11[tox]
22requires = tox>=4
3- env_list = py{37,38,39,310,311,312}, mypy, html
3+ env_list = py{37,38,39,310,311,312}, ruff, format, mypy, html, misc
44
55[testenv]
66description = Run unit tests
@@ -9,14 +9,27 @@ extras = test
99pass_env = SSH_*
1010commands = pytest --color =yes {posargs}
1111
12- [testenv:lint ]
13- description = Lint via pre-commit
12+ [testenv:ruff ]
13+ description = Lint with Ruff
1414base_python = py{39,310,311,312,38,37}
15- commands = pre-commit run --all-files --hook-stage manual
15+ deps = ruff
16+ set_env =
17+ CLICOLOR_FORCE = 1 # Set NO_COLOR to override this.
18+ commands = ruff check .
19+
20+ [testenv:format]
21+ description = Check formatting with Ruff
22+ base_python = py{39,310,311,312,38,37}
23+ deps = ruff
24+ set_env =
25+ CLICOLOR_FORCE = 1 # Set NO_COLOR to override this.
26+ commands = ruff format --check .
1627
1728[testenv:mypy]
1829description = Typecheck with mypy
1930base_python = py{39,310,311,312,38,37}
31+ set_env =
32+ MYPY_FORCE_COLOR = 1
2033commands = mypy -p git
2134ignore_outcome = true
2235
@@ -28,3 +41,10 @@ allowlist_externals = make
2841commands =
2942 make BUILDDIR ={env_tmp_dir}/doc/build -C doc clean
3043 make BUILDDIR ={env_tmp_dir}/doc/build -C doc html
44+
45+ [testenv:misc]
46+ description = Run other checks via pre-commit
47+ base_python = py{39,310,311,312,38,37}
48+ set_env =
49+ SKIP = ruff-format,ruff
50+ commands = pre-commit run --all-files
0 commit comments