nixos/testing: Support mypy through regular mechanisms
Rebase / forward port of 2c8bbf33fd
This commit is contained in:
parent
9303a3c73b
commit
52bfa318e8
1 changed files with 1 additions and 3 deletions
|
@ -52,6 +52,7 @@ let
|
|||
nativeBuildInputs = [
|
||||
hostPkgs.makeWrapper
|
||||
] ++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ];
|
||||
buildInputs = [ testDriver ];
|
||||
testScript = config.testScriptString;
|
||||
preferLocalBuild = true;
|
||||
passthru = config.passthru;
|
||||
|
@ -73,13 +74,10 @@ let
|
|||
|
||||
cat -n testScriptWithTypes
|
||||
|
||||
# set pythonpath so mypy knows where to find the imports. this requires the py.typed file.
|
||||
export PYTHONPATH='${../test-driver}'
|
||||
mypy --no-implicit-optional \
|
||||
--pretty \
|
||||
--no-color-output \
|
||||
testScriptWithTypes
|
||||
unset PYTHONPATH
|
||||
''}
|
||||
|
||||
echo -n "$testScript" >> $out/test-script
|
||||
|
|
Loading…
Reference in a new issue