-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.cfg
90 lines (80 loc) · 1.75 KB
/
setup.cfg
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[coverage:run]
branch = True
omit =
.tox/*
*/__init__.py
*/migrations/*
*/tests/*
*/wsgi.py
manage.py
tasks.py
source = .
[flake8]
exclude =
__pycache__,
.git,
.tox,
*/migrations/*,
ignore = D202,E203,E266,E501,W503
max-line-length = 80
select = B,C,D,E,F,I,W,T4,B9
[isort]
combine_as_imports = True
default_section = THIRDPARTY
force_grid_wrap = 0
include_trailing_comma = True
known_first_party = {{project_name}}
known_third_party = django
line_length = 88
multi_line_output = 3
not_skip = __init__.py
use_parentheses = True
[metadata]
license-file = LICENSE.md
[testenv:coverage]
commands_pre =
black --check .
flake8
isort --check-only --recursive
mypy .
commands =
pip-sync {toxinidir}/requirements/tests.txt
coverage run {toxinidir}/manage.py test --noinput
deps = -r{toxinidir}/requirements/tests.txt
passenv =
DATABASE_URL
DJANGO_SECRET_KEY
setenv =
DJANGO_SETTINGS_MODULE={{project_name}}.settings
DJANGO_CONFIGURATION=Testing
[testenv:report]
commands = coverage report
deps = coverage~=5.0.1
[testenv:reporthtml]
commands = coverage html
deps = coverage~=5.0.1
[testenv:reportxml]
commands = coverage xml -o test-reports/coverage.xml
deps = coverage~=5.0.1
[tox:tox]
envlist = coverage
skipsdist = True
[mypy]
python_version = 3.7
# https://github.com/ambv/flake8-mypy#configuration
show_column_numbers=True
show_error_context=False
follow_imports=skip
cache_dir=/dev/null
ignore_missing_imports=True
disallow_untyped_calls=False
warn_return_any=False
strict_optional=True
warn_no_return=True
warn_redundant_casts=False
warn_unused_ignores=False
disallow_untyped_defs=False
check_untyped_defs=False
[tool:pytest]
DJANGO_SETTINGS_MODULE={{project_name}}.settings
DJANGO_CONFIGURATION=Testing