From 313c4b55ed77e293f18100353303c8a9ac6378e4 Mon Sep 17 00:00:00 2001 From: Espen Albert Date: Sat, 21 Feb 2026 08:47:39 +0000 Subject: [PATCH] chore: Adds refurb and vulture to pre-push --- justfile | 7 ++++++- pyproject.toml | 25 +++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/justfile b/justfile index bf50ab0..3c03ebb 100644 --- a/justfile +++ b/justfile @@ -5,7 +5,7 @@ REPO_URL := "https://github.com/EspenAlbert/path-sync" # === DO_NOT_EDIT: path-sync standard === -pre-push: lint fmt-check test +pre-push: lint fmt-check test vulture @echo "All checks passed" pre-commit: fmt fix lint @@ -30,6 +30,11 @@ build: uv build # === OK_EDIT: path-sync standard === +# === DO_NOT_EDIT: path-sync vulture === +vulture: + uv run vulture . +# === OK_EDIT: path-sync vulture === + # === DO_NOT_EDIT: path-sync path-sync === path-sync-validate: uv run path-sync validate-no-changes -n python-template diff --git a/pyproject.toml b/pyproject.toml index a8a84f9..d34610b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ target-version = "py313" # UP046: use type parameters on functions instead of TypeVar # UP047: use type parameters instead of `Generic[T]` subclass extend-ignore = ["E501", "UP006", "UP007", "UP035", "UP040", "UP046", "UP047"] -extend-select = ["Q", "RUF100", "C90", "UP", "I", "T"] +extend-select = ["Q", "RUF100", "C90", "UP", "I", "T", "FURB"] # === OK_EDIT: path-sync ruff === # === DO_NOT_EDIT: path-sync pytest === @@ -84,16 +84,33 @@ omit = ["*_test.py"] exclude_lines = ["no cov", "if __name__ == .__main__.:"] # === OK_EDIT: path-sync coverage === -# === DO_NOT_EDIT: path-sync dev === +# === DO_NOT_EDIT: path-sync vulture === +[tool.vulture] +min_confidence = 80 +ignore_names = ["mock_*", "Mock*", "*_mock"] +exclude = [".venv/", "*test.py"] +# === OK_EDIT: path-sync vulture === + +# === DO_NOT_EDIT: path-sync dev-lint === [dependency-groups] -dev = [ +dev-lint = [ "pyright>=1.1", + "ruff>=0.14", + "vulture>=2.14", +] +# === OK_EDIT: path-sync dev-lint === + +# === DO_NOT_EDIT: path-sync dev-test === +dev-test = [ "pytest>=9.0", "pytest-asyncio>=0.24", "pytest-cov>=7.0", "pytest-regressions>=2.6", - "ruff>=0.14", ] +# === OK_EDIT: path-sync dev-test === + +# === DO_NOT_EDIT: path-sync dev === +dev = [{include-group = "dev-lint"}, {include-group = "dev-test"}] # === OK_EDIT: path-sync dev === # === DO_NOT_EDIT: path-sync docs ===