Skip to content

Commit d6c070f

Browse files
committed
Update tox config
1 parent 17ee994 commit d6c070f

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

tox.ini

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22

33
envlist =
4-
flake8
4+
flake8, mypy
55
test-py{26,27,34,35,36,37,38,py,py3}
66
coverage_report
77
packaging
@@ -54,6 +54,8 @@ passenv =
5454
setenv =
5555
PY_MODULE=hyperlink
5656

57+
test: PYTHONPYCACHEPREFIX={envtmpdir}/pycache
58+
5759
test: COVERAGE_FILE={toxworkdir}/coverage.{envname}
5860
{coverage_report,codecov}: COVERAGE_FILE={toxworkdir}/coverage
5961
codecov: COVERAGE_XML={envlogdir}/coverage_report.xml
@@ -74,16 +76,15 @@ basepython = python3.8
7476

7577
skip_install = True
7678

77-
# Pin pydocstyle to version 3: see https://gitlab.com/pycqa/flake8-docstrings/issues/36
7879
deps =
7980
flake8-bugbear==19.8.0
80-
#flake8-docstrings==1.4.0
81-
#flake8-import-order==0.18.1
82-
#flake8-pep3101==1.2.1
81+
#flake8-docstrings==1.5.0
8382
flake8==3.7.9
8483
mccabe==0.6.1
8584
pep8-naming==0.9.1
8685
pydocstyle==4.0.1
86+
# pin pyflakes pending a release with https://github.com/PyCQA/pyflakes/pull/455
87+
git+git://github.com/PyCQA/pyflakes@ffe9386#egg=pyflakes
8788

8889
commands =
8990
flake8 {posargs:src/{env:PY_MODULE}}
@@ -139,11 +140,9 @@ basepython = python3.8
139140

140141
skip_install = True
141142

142-
143143
deps =
144144
mypy==0.740
145145

146-
147146
commands =
148147
mypy \
149148
--config-file="{toxinidir}/tox.ini" \
@@ -171,7 +170,7 @@ warn_unused_ignores = True
171170
# Enable these over time
172171
check_untyped_defs = False
173172

174-
# Disable some checks until effected files fully adopt mypy
173+
# Don't complain about dependencies known to lack type hints
175174

176175
[mypy-hyperlink._url]
177176
allow_untyped_defs = True
@@ -197,8 +196,8 @@ deps =
197196

198197
commands =
199198
coverage combine
200-
coverage report
201-
coverage html
199+
- coverage report
200+
- coverage html
202201

203202

204203
##
@@ -218,13 +217,17 @@ deps =
218217
codecov==2.0.15
219218

220219
commands =
220+
# Note documentation for CI variables in default environment's passenv
221+
221222
coverage combine
222223
coverage xml -o "{env:COVERAGE_XML}"
223-
codecov --file="{env:COVERAGE_XML}" --env \
224-
GITHUB_REF GITHUB_COMMIT GITHUB_USER GITHUB_WORKFLOW \
225-
TRAVIS_BRANCH TRAVIS_BUILD_WEB_URL TRAVIS_COMMIT TRAVIS_COMMIT_MESSAGE \
226-
APPVEYOR_REPO_BRANCH APPVEYOR_REPO_COMMIT \
227-
APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED
224+
codecov --file="{env:COVERAGE_XML}" --env \
225+
GITHUB_REF GITHUB_COMMIT GITHUB_USER GITHUB_WORKFLOW \
226+
TRAVIS_BRANCH TRAVIS_BUILD_WEB_URL \
227+
TRAVIS_COMMIT TRAVIS_COMMIT_MESSAGE \
228+
APPVEYOR_REPO_BRANCH APPVEYOR_REPO_COMMIT \
229+
APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL \
230+
APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED
228231

229232

230233
##
@@ -240,7 +243,9 @@ basepython = python
240243
deps =
241244
check-manifest==0.40
242245
readme_renderer==24.0
246+
twine==2.0.0
243247

244248
commands =
245249
check-manifest
246-
python setup.py check --metadata --restructuredtext --strict
250+
pip wheel --wheel-dir "{envtmpdir}/dist" --no-deps {toxinidir}
251+
twine check "{envtmpdir}/dist/"*

0 commit comments

Comments
 (0)