1
1
[tox]
2
2
requires = 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
4
4
5
5
[testenv]
6
6
description = Run unit tests
@@ -9,14 +9,27 @@ extras = test
9
9
pass_env = SSH_*
10
10
commands = pytest --color =yes {posargs}
11
11
12
- [testenv:lint ]
13
- description = Lint via pre-commit
12
+ [testenv:ruff ]
13
+ description = Lint with Ruff
14
14
base_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 .
16
27
17
28
[testenv:mypy]
18
29
description = Typecheck with mypy
19
30
base_python = py{39,310,311,312,38,37}
31
+ set_env =
32
+ MYPY_FORCE_COLOR = 1
20
33
commands = mypy -p git
21
34
ignore_outcome = true
22
35
@@ -28,3 +41,10 @@ allowlist_externals = make
28
41
commands =
29
42
make BUILDDIR ={env_tmp_dir}/doc/build -C doc clean
30
43
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