forked from stephenmcd/mezzanine
-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
71 lines (65 loc) · 1.53 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[tox]
envlist =
py{38,39,310,311}-dj{40,41,42,50}
package
lint
[testenv]
# Run test suite
usedevelop = true
deps =
.[testing]
dj40: Django>=4.0, <4.1
dj41: Django>=4.1, <4.2
dj42: Django>=4.2, <4.3
dj50: Django>=5.0, <5.1
commands =
pytest --basetemp="{envtmpdir}" --junitxml="junit/TEST-{envname}.xml" {posargs}
[testenv:package]
# Check package integrity and compatibility with PyPI
deps =
twine
check-manifest
skip_install = true
commands =
python setup.py -q sdist --dist-dir="{envtmpdir}/dist"
twine check "{envtmpdir}/dist/*"
check-manifest --ignore-bad-ideas '*.mo' {toxinidir}
[testenv:lint]
skip_install = true
deps = .[codestyle]
commands =
isort --diff --atomic .
black --check .
flake8 .
[testenv:pyupgrade]
# Run pyupgrade with non-zero exit code (notice `+` at the end of command)
skip_install = true
allowlist_externals = sh
deps = .[codestyle]
commands =
sh -c 'find . -path ./.tox -prune -false -o -name "*.py" -exec pyupgrade --py37-plus \{\} +'
[testenv:format]
# This env is not run by default. It's provided here for you to easily
# autoformat code by running `tox -e format`
skip_install = true
allowlist_externals = sh
deps = .[codestyle]
commands =
sh -c 'find . -path ./.tox -prune -false -o -name "*.py" -exec pyupgrade --py37-plus \{\} \;'
isort --atomic .
black .
[flake8]
# Configured to match black
ignore =
E203
W503
E731
max-line-length = 88
exclude =
migrations
.tox
.git
.eggs
*.egg-info
build
dist