diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2019-11-08 10:01:29 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2019-11-11 13:49:48 +0000 |
commit | 03e6ca15e205bf892eac08a5f561c3a16284c90a (patch) | |
tree | 3fce743ca1a921659ab661cc542136bf14be5134 /nixos/lib/testing-python.nix | |
parent | 556a169f14f4970927b8c18a997dbf323ed9a865 (diff) |
test-driver: add mypy support
It's a good idea to expand this in future to test code as well, so we get type checking there as well.
Diffstat (limited to 'nixos/lib/testing-python.nix')
-rw-r--r-- | nixos/lib/testing-python.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 21f6172e9671d..4d990cf551f3d 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -26,7 +26,7 @@ in rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ (python3.withPackages (p: [ p.ptpython ])) ]; - checkInputs = with python3Packages; [ pylint black ]; + checkInputs = with python3Packages; [ pylint black mypy ]; dontUnpack = true; @@ -34,6 +34,9 @@ in rec { doCheck = true; checkPhase = '' + mypy --disallow-untyped-defs \ + --no-implicit-optional \ + --ignore-missing-imports ${testDriverScript} pylint --errors-only ${testDriverScript} black --check --diff ${testDriverScript} ''; |