fix mypy errors

This commit is contained in:
Jörg Thalheim
2023-08-23 12:32:06 +02:00
parent 7b7a367ff4
commit 59e31b3c56
3 changed files with 27 additions and 37 deletions

View File

@@ -3,7 +3,6 @@
, black
, bubblewrap
, installShellFiles
, mypy
, nix
, openssh
, pytest
@@ -31,7 +30,6 @@ let
pytest
pytest-cov
pytest-subprocess
mypy
openssh
stdenv.cc
];
@@ -60,27 +58,17 @@ python3.pkgs.buildPythonPackage {
];
propagatedBuildInputs = dependencies;
passthru.tests = {
clan-mypy = runCommand "clan-mypy" { } ''
export CLAN_OPTIONS_FILE="${CLAN_OPTIONS_FILE}"
cp -r ${source} ./src
chmod +w -R ./src
cd ./src
${checkPython}/bin/mypy .
touch $out
'';
clan-pytest = runCommand "clan-tests"
{
nativeBuildInputs = [ age zerotierone bubblewrap sops nix openssh rsync stdenv.cc ];
} ''
export CLAN_OPTIONS_FILE="${CLAN_OPTIONS_FILE}"
cp -r ${source} ./src
chmod +w -R ./src
cd ./src
NIX_STATE_DIR=$TMPDIR/nix ${checkPython}/bin/python -m pytest -s ./tests
touch $out
'';
};
passthru.tests.clan-pytest = runCommand "clan-tests"
{
nativeBuildInputs = [ age zerotierone bubblewrap sops nix openssh rsync stdenv.cc ];
} ''
export CLAN_OPTIONS_FILE="${CLAN_OPTIONS_FILE}"
cp -r ${source} ./src
chmod +w -R ./src
cd ./src
NIX_STATE_DIR=$TMPDIR/nix ${checkPython}/bin/python -m pytest -s ./tests
touch $out
'';
passthru.devDependencies = [
ruff
@@ -89,6 +77,8 @@ python3.pkgs.buildPythonPackage {
wheel
] ++ testDependencies;
passthru.testDependencies = testDependencies;
makeWrapperArgs = [
"--set CLAN_FLAKE ${self}"
];