diff --git a/.github/hooks/pre-commit b/.github/hooks/pre-commit new file mode 100755 index 0000000..b466419 --- /dev/null +++ b/.github/hooks/pre-commit @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ruff check ./ diff --git a/flake.nix b/flake.nix index 0639b38..86c5910 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ setuptools wheel venvShellHook - pylint + pkgs.ruff ]); # python setup @@ -35,11 +35,11 @@ unset SOURCE_DATE_EPOCH ''; postShellHook = '' - # python setup unset SOURCE_DATE_EPOCH unset LD_PRELOAD PYTHONPATH=$PWD/$venvDir/${python.sitePackages}:$PYTHONPATH pip install --require-virtualenv -r requirements.txt | grep -v 'already satisfied' + git config --local core.hooksPath .github/hooks ''; };