-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
307 lines (286 loc) · 11.3 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# This file is managed by 'repo_helper'.
# You may add new sections, but any changes made to the following sections will be lost:
# * tox
# * envlists
# * testenv
# * testenv:.package
# * testenv:py313-dev
# * testenv:py313
# * testenv:py312-dev
# * testenv:py312
# * testenv:docs
# * testenv:build
# * testenv:lint
# * testenv:perflint
# * testenv:mypy
# * testenv:pyup
# * testenv:coverage
# * flake8
# * coverage:run
# * coverage:report
# * check-wheel-contents
# * pytest
[tox]
envlist =
py36-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5}
py37-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3}
py38-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py39-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py310-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py311-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py312-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py313-dev-sphinx{6.2,7.0,7.1,7.2}
pypy36-sphinx{4.3,4.4,4.5}
pypy37-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3}
pypy38-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
pypy39-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
mypy
build
skip_missing_interpreters = True
isolated_build = True
requires =
pip>=21,!=22.2
tox-envlist>=0.2.1
tox~=3.0
virtualenv!=20.16.0
[envlists]
test =
py36-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5}
py37-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3}
py38-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py39-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py310-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py311-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py312-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
py313-dev-sphinx{6.2,7.0,7.1,7.2}
pypy36-sphinx{4.3,4.4,4.5}
pypy37-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3}
pypy38-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
pypy39-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}
qa = mypy, lint
cov = py38-sphinx3.4, coverage
[testenv]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
SETUPTOOLS_USE_DISTUTILS=stdlib
deps =
-r{toxinidir}/tests/requirements.txt
sphinx3.4: sphinx~=3.4.0
sphinx3.5: sphinx~=3.5.0
sphinx4.0: sphinx~=4.0.0
sphinx4.1: sphinx~=4.1.0
sphinx4.2: sphinx~=4.2.0
sphinx4.3: sphinx~=4.3.0
sphinx4.4: sphinx~=4.4.0
sphinx4.5: sphinx~=4.5.0
sphinx5.0: sphinx~=5.0.0
sphinx5.1: sphinx~=5.1.0
sphinx5.2: sphinx~=5.2.0
sphinx5.3: sphinx~=5.3.0
sphinx6.0: sphinx~=6.0.0
sphinx6.1: sphinx~=6.1.0
sphinx6.2: sphinx~=6.2.0
sphinx7.0: sphinx~=7.0.0
sphinx7.1: sphinx~=7.1.0
sphinx7.2: sphinx~=7.2.0
extras = all
commands =
python --version
python -m pytest --cov=enum_tools -r aR tests/ {posargs}
[testenv:.package]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
[testenv:py313-dev]
download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1
[testenv:py312]
download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
basepython = python3.8
changedir = {toxinidir}/doc-source
extras = all
deps = -r{toxinidir}/doc-source/requirements.txt
commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs}
[testenv:build]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
PIP_PREFER_BINARY=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1
skip_install = True
changedir = {toxinidir}
deps =
build[virtualenv]>=0.3.1
check-wheel-contents>=0.1.0
twine>=3.2.0
cryptography<40; implementation_name == "pypy" and python_version <= "3.7"
commands =
python -m build --sdist --wheel "{toxinidir}"
twine check dist/*.tar.gz dist/*.whl
check-wheel-contents dist/
[testenv:lint]
basepython = python3.8
changedir = {toxinidir}
ignore_errors = True
skip_install = True
deps =
flake8>=3.8.2,<5
flake8-2020>=1.6.0
flake8-builtins>=1.5.3
flake8-docstrings>=1.5.0
flake8-dunder-all>=0.1.1
flake8-encodings>=0.1.0
flake8-github-actions>=0.1.0
flake8-noqa>=1.1.0,<=1.2.2
flake8-pyi>=20.10.0,<=22.8.0
flake8-pytest-style>=1.3.0,<2
flake8-quotes>=3.3.0
flake8-slots>=0.1.0
flake8-sphinx-links>=0.0.4
flake8-strftime>=0.1.1
flake8-typing-imports>=1.10.0
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods
git+https://github.com/python-formate/flake8-missing-annotations.git
pydocstyle>=6.0.0
pygments>=2.7.1
importlib_metadata<4.5.0; python_version<'3.8'
commands = python3 -m flake8_rst_docstrings_sphinx enum_tools tests --allow-toolbox {posargs}
[testenv:perflint]
basepython = python3.8
changedir = {toxinidir}
ignore_errors = True
skip_install = True
deps = perflint
commands = python3 -m perflint enum_tools {posargs}
[testenv:mypy]
basepython = python3.8
ignore_errors = True
changedir = {toxinidir}
extras = all
deps =
mypy==1.10.1
-r{toxinidir}/tests/requirements.txt
-r{toxinidir}/stubs.txt
commands = mypy enum_tools tests {posargs}
[testenv:pyup]
basepython = python3.8
skip_install = True
ignore_errors = True
changedir = {toxinidir}
deps = pyupgrade-directories
extras = all
commands = pyup_dirs enum_tools tests --py36-plus --recursive
[testenv:coverage]
basepython = python3.8
skip_install = True
ignore_errors = True
whitelist_externals = /bin/bash
passenv =
COV_PYTHON_VERSION
COV_PLATFORM
COV_PYTHON_IMPLEMENTATION
*
changedir = {toxinidir}
deps =
coverage>=5
coverage_pyver_pragma>=0.2.1
commands =
/bin/bash -c "rm -rf htmlcov"
coverage html
/bin/bash -c "DISPLAY=:0 firefox 'htmlcov/index.html'"
[flake8]
max-line-length = 120
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv
rst-directives =
TODO
automodule
autosummary-widths
envvar
extras-require
license
license-info
rst-roles = choosealicense
per-file-ignores =
tests/*: D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
*/*.pyi: E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
enum_tools/documentation.py: D300 D301
pytest-parametrize-names-type = csv
inline-quotes = "
multiline-quotes = """
docstring-quotes = """
count = True
min_python_version = 3.6.1
unused-arguments-ignore-abstract-functions = True
unused-arguments-ignore-overload-functions = True
unused-arguments-ignore-magic-methods = True
unused-arguments-ignore-variadic-names = True
[coverage:run]
plugins = coverage_pyver_pragma
[coverage:report]
fail_under = 86
show_missing = True
exclude_lines =
raise AssertionError
raise NotImplementedError
if 0:
if False:
if TYPE_CHECKING
if typing.TYPE_CHECKING
if __name__ == .__main__.:
[check-wheel-contents]
ignore = W002
toplevel = enum_tools
package = enum_tools
[pytest]
addopts = --color yes --durations 25
timeout = 300
filterwarnings =
error
ignore:'contextfunction' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.:DeprecationWarning
ignore:'environmentfilter' is renamed to 'pass_environment', the old name will be removed in Jinja 3.1.:DeprecationWarning
ignore::DeprecationWarning:certifi
ignore:can't resolve package from __spec__ or __package__, falling back on __name__ and __path__:ImportWarning
ignore:distutils Version classes are deprecated. Use packaging.version instead:DeprecationWarning:sphinx[.*]
once:The `docutils.parsers.rst.directive.html` module will be removed in Docutils 1.2.:DeprecationWarning
once:nodes.Node.traverse:PendingDeprecationWarning
once:nodes.Node.traverse:DeprecationWarning
once:The distutils package is deprecated:DeprecationWarning
always:module 'sre_(constants|parse)' is deprecated:DeprecationWarning
always:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:babel[.*]
always:builtins.type size changed, may indicate binary incompatibility:RuntimeWarning
always:builtins.bool size changed, may indicate binary incompatibility:RuntimeWarning
always:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning:sphinx.util.images
always:pkg_resources is deprecated as an API:DeprecationWarning
always:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning
always:datetime.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version:DeprecationWarning:sphinx.builders.gettext
always:datetime.datetime.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version:DeprecationWarning:sphinx.builders.gettext
always:The `docutils.parsers.rst.directive.html` module will be removed in Docutils 2.0.:DeprecationWarning
always:The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.:DeprecationWarning
always:The frontend.Option class will be removed in Docutils 0.21 or later.:DeprecationWarning
always:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning
[testenv:py312-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
[testenv:py313-dev-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1
[testenv:py312-dev-sphinx{3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2}]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1