-
Notifications
You must be signed in to change notification settings - Fork 264
/
tox.ini
192 lines (155 loc) · 4.58 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[tox]
envlist =
py312-lint,py312-docs,
{py37,py38}-django{2.2}-drf{3.10,3.11},
{py37,py38,py39}-django{3.2}-drf{3.11,3.12},
{py38,py39,py310}-django{4.0,4.1}-drf{3.13,3.14},
{py311}-django{4.1, 4.2, 5.0}-drf{3.14},
{py312}-django{4.2, 5.0}-drf{3.14},
{py312}-django{5.1}-drf{3.15},
py312-django5.1-drfmaster,
py312-djangomaster-drf3.15,
py312-drfmaster-djangomaster
py312-drfmaster-djangomaster-allowcontribfail
skip_missing_interpreters = true
[testenv]
commands = python runtests.py {posargs:--fast --cov=drf_spectacular --cov=tests --cov-report=xml}
setenv =
PYTHONDONTWRITEBYTECODE=1
passenv =
CI
deps =
django2.2: Django>=2.2,<3.0
django3.2: Django>=3.2,<4.0
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
django4.2: Django>=4.2,<4.3
django5.0: Django>=5.0,<5.1
django5.1: Django>=5.1,<5.2
drf3.10: djangorestframework>=3.10,<3.11
drf3.11: djangorestframework>=3.11,<3.12
drf3.12: djangorestframework>=3.12,<3.13
drf3.13: djangorestframework>=3.13,<3.14
drf3.14: djangorestframework>=3.14,<3.15
drf3.15: djangorestframework>=3.15,<3.16
djangomaster: https://github.com/django/django/archive/main.tar.gz
drfmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
-r requirements/testing.txt
-r requirements/optionals.txt
[testenv:py312-drfmaster-djangomaster-allowcontribfail]
commands = python runtests.py {posargs:--fast --cov=drf_spectacular --cov=tests --cov-report=xml --allow-contrib-fail}
[testenv:py312-lint]
commands = python runtests.py --lintonly
deps =
-r requirements/base.txt
-r requirements/linting.txt
-r requirements/linting-base.txt
[testenv:py312-docs]
commands = sphinx-build -WEa -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
deps =
-r requirements/docs.txt
[coverage:report]
precision = 2
exclude_lines =
pragma: no cover
except ImportError
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING:
[pytest]
markers =
contrib: marks upstream package dependency
system_requirement_fulfilled: marks system library dependency.
[flake8]
ignore =
# line break before binary operator
W503,
max-line-length = 120
[isort]
skip = .eggs,.tox,docs,env
skip_glob = venv*
line_length = 100
known_first_party = drf_spectacular,tests
known_third_party =
django
rest_framework
uritemplate
yaml
jsonschema
inflection
allauth
dj_rest_auth
rest_framework_simplejwt
rest_polymorphic
rest_framework_jwt
polymorphic
oauth2_provider
djstripe
knox
multi_line_output = 5
use_parentheses = true
include_trailing_comma = true
[mypy]
python_version = 3.10
plugins = mypy_django_plugin.main,mypy_drf_plugin.main
warn_unused_configs = True
warn_redundant_casts = True
warn_unused_ignores = True
[mypy.plugins.django-stubs]
django_settings_module = "tests.settings"
[mypy-drf_spectacular.*]
strict_equality = True
no_implicit_optional = True
disallow_untyped_decorators = True
disallow_subclassing_any = True
no_implicit_reexport = True
;check_untyped_defs = True
;warn_return_any = True
;disallow_incomplete_defs = True
;disallow_any_generics = True
;disallow_untyped_calls = True
;disallow_untyped_defs = True
[mypy-rest_framework.compat.*]
ignore_missing_imports = True
[mypy-rest_framework.utils.mediatypes.*]
ignore_missing_imports = True
[mypy-allauth.*]
ignore_missing_imports = True
[mypy-dj_rest_auth.*]
ignore_missing_imports = True
[mypy-rest_framework_simplejwt.*]
ignore_missing_imports = True
[mypy-oauth2_provider.*]
ignore_missing_imports = True
[mypy-rest_framework_jwt.*]
ignore_missing_imports = True
[mypy-knox.*]
ignore_missing_imports = True
[mypy-uritemplate.*]
ignore_missing_imports = True
[mypy-inflection.*]
ignore_missing_imports = True
[mypy-jsonschema.*]
ignore_missing_imports = True
[mypy-djangorestframework_camel_case.util.*]
ignore_missing_imports = True
[mypy-django_filters.*]
ignore_missing_imports = True
[mypy-polymorphic.*]
ignore_missing_imports = True
[mypy-rest_polymorphic.*]
ignore_missing_imports = True
[mypy-rest_framework_nested.*]
ignore_missing_imports = True
[mypy-rest_framework_recursive.*]
ignore_missing_imports = True
[mypy-rest_framework_dataclasses.*]
ignore_missing_imports = True
[mypy-rest_framework_gis.*]
ignore_missing_imports = True
[mypy-djangorestframework_camel_case.*]
ignore_missing_imports = True
[mypy-pydantic.*]
ignore_missing_imports = True
[mypy-exceptiongroup.*]
ignore_missing_imports = True