From 7c6e9e878dd6d9b92e97b960bb366d5291d15c57 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Thu, 30 Dec 2021 13:16:27 +0000 Subject: [PATCH 1/2] Update tox.ini with result of templating (some old jobs are preserved) --- tox.ini | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 25b0039..47107a7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,8 @@ [tox] -envlist = packaging, pep8, py35, py36, py37, py38 -isolated_build = True +envlist = packaging, pep8, py35, py36, py37, py38, check_codestyle, check_types + +# required for PEP 517 (pyproject.toml-style) builds +isolated_build = true [testenv] deps = @@ -23,6 +25,7 @@ commands = check-manifest [testenv:pep8] +# Temporary, for backwards compatibility with the BuildKite pipelines skip_install = True basepython = python3.5 deps = @@ -40,3 +43,19 @@ deps = commands = coverage xml codecov -X gcov + +[testenv:check_codestyle] + +extras = dev + +commands = + flake8 ldap_auth_provider.py tests + black --check --diff ldap_auth_provider.py tests + isort --check-only --diff ldap_auth_provider.py tests + +[testenv:check_types] + +extras = dev + +commands = + mypy ldap_auth_provider.py tests From 1710ff4fc40c724dba681deefc85c2d60ea2cf40 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Thu, 30 Dec 2021 13:20:51 +0000 Subject: [PATCH 2/2] Don't check types for tests (temporarily) --- mypy.ini | 2 ++ tox.ini | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index 35dc6cb..f21932a 100644 --- a/mypy.ini +++ b/mypy.ini @@ -6,6 +6,8 @@ check_untyped_defs = True scripts_are_modules = True +# TODO The tests currently do not pass Mypy. +# Don't forget to update tox.ini when they do! files = ldap_auth_provider.py diff --git a/tox.ini b/tox.ini index 47107a7..439a980 100644 --- a/tox.ini +++ b/tox.ini @@ -58,4 +58,6 @@ commands = extras = dev commands = - mypy ldap_auth_provider.py tests + # mypy ldap_auth_provider.py tests + # tests currently do not pass + mypy ldap_auth_provider.py