-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
72 lines (63 loc) · 1.32 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
72
[tox]
skipsdist = True
basepython = python3.11
envlist = py311, flake8, typecheck,lint
recreate= false
[pytest]
addopts = --durations=10 --showlocals
testpaths = tests
pythonpath = apps
django_find_project = true
DJANGO_SETTINGS_MODULE = tests.settings
markers =
slow
[testenv]
envdir = {toxworkdir}/env
whitelist_externals=*
passenv =
*
PYTHONPATH
DJANGO_SETTINGS_MODULE
setenv =
ENV_FILE={env:ENV_FILE:.env.tox}
PYTHONPATH = {toxinidir}
DJANGO_SETTINGS_MODULE=tests.settings
deps =
-r requirements_dev.txt
[testenv:py311]
commands = pytest {posargs} \
-m "not slow"
[testenv:typecheck]
deps =
{[testenv]deps}
commands =
mypy --config-file=tox.ini apps
[testenv:lint]
profile = black
deps =
{[testenv]deps}
commands =
flake8
black --check apps/ tests/
isort --check-only apps/ tests/
[testenv:fmt]
deps =
{[testenv]deps}
commands =
black apps/ tests/
isort apps/ tests/
[flake8]
exclude = migrations,urls.py,manage.py,settings.py,admin.py,.tox,venv
max-line-length = 120
max-complexity = 10
ignore = E203,W503,W504,I001,E203,E701
enable-extensions=G
per-file-ignores =
*/__init__.py: F401
[mypy]
python_version = 3.11
ignore_missing_imports = True
incremental = True
check_untyped_defs = True
[mypy-*.migrations.*,apps.settings.*,*.admin]
ignore_errors = True