From f39ce38b2f07643431142e65a1c49331ff32b8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Thu, 9 Apr 2020 18:59:52 +0100 Subject: Run flake8 and mypy as part of pytest, but on 3.8 only. There's no need to run mypy and flake8 on multiple Python versions, since they are independent. So instead prefer running them on the most recent stable release. --- .travis.yml | 6 ++---- setup.py | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5cc111..739ec0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,9 @@ language: python matrix: include: - python: 3.7 - env: PRE_COMMIT=true - python: 3.8 + env: PRE_COMMIT=true PYTEST_OPTIONS="--mypy --flake8" - python: 3.9-dev - env: RUN_MYPY=false install: - pip install .[all] @@ -20,6 +19,5 @@ addons: - libudev-dev script: - - py.test - - if [[ $RUN_MYPY != false ]]; then mypy glucometerutils reversing_tools; fi + - pytest $PYTEST_OPTIONS - if [[ $PRE_COMMIT ]]; then pre-commit install; pre-commit run --all-files; fi diff --git a/setup.py b/setup.py index 689c00d..19b5f87 100644 --- a/setup.py +++ b/setup.py @@ -30,6 +30,8 @@ extras_require = { "construct>=2.9", "mypy", "pre-commit", + "pytest-flake8", + "pytest-mypy", "pytest-timeout>=1.3.0", "pytest>=3.6.0", ], -- cgit v1.2.3