diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e463f4f9..75a27862 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,11 @@ repos: - repo: local hooks: + - id: reuse + name: reuse + entry: reuse lint-file + language: system + - id: pyright name: pyright entry: pyright diff --git a/nix/shell.nix b/nix/shell.nix index 9c3a499d..611863eb 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -118,7 +118,7 @@ pkgs.mkShellNoCC { if [ ! -f "''${venv}"/pyproject.toml ] || ! diff --brief pyproject.toml "''${venv}"/pyproject.toml >/dev/null; then printf '%s\n' 'Installing dependencies, pyproject.toml changed...' >&2 - uv pip install --quiet --editable . --group docs --group extra --group test + uv pip install --quiet --editable . --group docs --group extra --group reuse --group test cp pyproject.toml "''${venv}"/pyproject.toml fi diff --git a/pyproject.toml b/pyproject.toml index 48e7bff0..e13ed903 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,11 @@ check = [{ include-group = "lint" }, { include-group = "test" }] build = [{ include-group = "pyinstaller" }] docs = [{ include-group = "mkdocs" }] extra = [{ include-group = "pre-commit" }] -lint = [{ include-group = "pyright" }, { include-group = "ruff" }] +lint = [ + { include-group = "pyright" }, + { include-group = "reuse" }, + { include-group = "ruff" }, +] test = [{ include-group = "pytest" }] mkdocs = [ @@ -75,6 +79,7 @@ pytest = [ "pytest-qt==4.4.0", "syrupy==5.1.0", ] +reuse = ["reuse==6.*"] ruff = ["ruff==0.15.17"] [tool.hatch.build.targets.wheel]