Using pylint as a pre-commit hook it can't import requests which leads to not being able to commit changes, this is what my shell.nix looks like:
{
pkgs ? import <nixpkgs> {},
pre-commit-hooks,
}: let
pre-commit-check = pre-commit-hooks.lib.${pkgs.system}.run {
src = ./.;
hooks = {
ruff.enable = true;
pylint.enable = true;
};
};
myPython = pkgs.python3.withPackages (pyPkgs: with pyPkgs; [requests pylint]);
in
pkgs.mkShell {
name = "hb-downloader";
buildInputs = [myPython];
nativeBuildInputs = [pkgs.aria2 pkgs.ruff pkgs.basedpyright];
shellHook = ''
PYTHONPATH=${myPython}/${myPython.sitePackages}
${pre-commit-check.shellHook}
'';
}
I can run the python code directly with no issues,and when edition the python code with neovim ruff and basedpyright don't say anything about not being able to import requests.
Using pylint as a pre-commit hook it can't import requests which leads to not being able to commit changes, this is what my shell.nix looks like:
I can run the python code directly with no issues,and when edition the python code with neovim ruff and basedpyright don't say anything about not being able to import requests.