nixos-rebuild-ng: make sure mypy in CI is running with its configuration
This commit is contained in:
@@ -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
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user