nixos-rebuild-ng: make sure mypy in CI is running with its configuration

This commit is contained in:
Thiago Kenji Okada
2025-09-22 12:10:15 +01:00
parent 76c618ecdd
commit 08371b385d
+6 -3
View File
@@ -134,14 +134,17 @@ python3Packages.buildPythonApplication rec {
# NOTE: this is a passthru test rather than a build-time test because we
# want to keep the build closures small
linters = runCommand "${pname}-linters" { nativeBuildInputs = [ python-with-pkgs ]; } ''
export MYPY_CACHE_DIR="$(mktemp -d)"
export RUFF_CACHE_DIR="$(mktemp -d)"
pushd ${src}
echo -e "\x1b[32m## run mypy\x1b[0m"
mypy ${src}
mypy .
echo -e "\x1b[32m## run ruff\x1b[0m"
ruff check ${src}
ruff check .
echo -e "\x1b[32m## run ruff format\x1b[0m"
ruff format --check ${src}
ruff format --check .
popd
touch $out
'';