Skip mypy installation for pypy<3.9

This commit is contained in:
Unrud 2022-07-03 11:36:28 +02:00
parent 14a3c3d763
commit c589c9fc0d
1 changed files with 7 additions and 2 deletions

View File

@ -13,13 +13,18 @@ extras =
deps =
flake8
isort
mypy
# mypy installation fails with pypy<3.9
mypy; implementation_name!='pypy' or python_version>='3.9'
types-setuptools
pytest-cov
commands =
flake8 .
isort --check --diff .
mypy .
# Run mypy if it's installed
python -c 'import importlib.util, subprocess, sys; \
importlib.util.find_spec("mypy") \
and sys.exit(subprocess.run(["mypy", "."]).returncode) \
or print("mypy is not installed")'
pytest -r s --cov --cov-report=term --cov-report=xml .
[tool:isort]