forked from jendrikseipp/vulture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
56 lines (51 loc) · 1.29 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[tox]
envlist = cleanup, py{38,310,311,312}, style # Skip py39 since it chokes on distutils.
skip_missing_interpreters = true
# Erase old coverage results, then accumulate them during this tox run.
[testenv:cleanup]
deps =
coverage==7.0.5
commands =
coverage erase
[testenv]
deps =
coverage==7.0.5
pint # Use latest version to catch API changes.
pytest==7.4.2
pytest-cov==4.0.0
commands =
pytest {posargs}
# Install package as wheel in all envs (https://hynek.me/articles/turbo-charge-tox/).
package = wheel
wheel_build_env = .pkg
[pytest]
filterwarnings =
error::DeprecationWarning
error::PendingDeprecationWarning
[testenv:style]
basepython = python3
deps =
black==22.3.0
flake8==6.1.0
flake8-2020==1.7.0
flake8-bugbear==23.9.16
flake8-comprehensions==3.14.0
pyupgrade==2.28.0
allowlist_externals =
bash
commands =
black --check --diff .
# B028: use !r conversion flag
# C408: unnecessary dict call
flake8 --extend-ignore=B028,C408 setup.py tests/ vulture/
bash -c "pyupgrade --py38-plus `find dev/ tests/ vulture/ -name '*.py'` setup.py"
[testenv:fix-style]
basepython = python3
deps =
black==22.3.0
pyupgrade==2.28.0
allowlist_externals =
bash
commands =
black .
bash -c "pyupgrade --py38-plus --exit-zero `find dev/ tests/ vulture/ -name '*.py'` setup.py"