mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
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.
This commit is contained in:
parent
556a169f14
commit
03e6ca15e2
2 changed files with 103 additions and 91 deletions
|
@ -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}
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue