File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,30 @@ Check types with `mypy <http://mypy-lang.org/>`_:
6464
6565 python -m mypy --show-error-context --show-error-codes rdflib
6666
67+ Using tox
68+ ---------------------
69+
70+ RDFLib has a `tox <https://tox.wiki/en/latest/index.html >`_ config file that
71+ makes it easier to run validation on all supported python versions.
72+
73+ .. code-block :: bash
74+
75+ # install tox
76+ pip install tox
77+
78+ # list tox environments that run by default
79+ tox -e
80+
81+ # list all tox environments
82+ tox -a
83+
84+ # run default environment for all python versions
85+ tox
86+
87+ # run a specific environment
88+ tox -e py37 # default environment with py37
89+ tox -e py39-mypy # mypy environment with py39
90+
6791 Writing documentation
6892---------------------
6993
Original file line number Diff line number Diff line change 11[tox]
22envlist =
3- py37,py38,py39
3+ py37,py38,py39,py310
44
55[testenv]
66setenv =
77 BERKELEYDB_DIR = /usr
88commands =
9+ {envpython} -m mypy rdflib --show-error-context --show-error-codes
910 {envpython} setup.py clean --all
1011 {envpython} setup.py build
1112 {envpython} -m pytest
2627 -rrequirements.txt
2728 -rrequirements.dev.txt
2829
29- [testenv:mypy]
30- basepython =
31- python3.7
30+ [testenv:py3{7,8,9,10}-mypy]
3231commands =
3332 {envpython} -m mypy rdflib --show-error-context --show-error-codes
3433deps =
You can’t perform that action at this time.
0 commit comments