diff --git a/vibetuner-template/.justfiles/linting.justfile b/vibetuner-template/.justfiles/linting.justfile index d9c6c019..099998c7 100644 --- a/vibetuner-template/.justfiles/linting.justfile +++ b/vibetuner-template/.justfiles/linting.justfile @@ -26,7 +26,7 @@ lint-yaml: # Lint PO translation files with lint-po [group('Code quality: linting')] lint-po: - @bash -c 'shopt -s nullglob; files=(locales/*/LC_MESSAGES/*.po); if (( ${#files[@]} )); then uvx lint-po "${files[@]}"; else echo "No .po files to lint"; fi' + @bash -c 'shopt -s nullglob; files=(locales/*/LC_MESSAGES/*.po); if (( ${#files[@]} )); then uv run --frozen lint-po "${files[@]}"; else echo "No .po files to lint"; fi' # Type check Python files with ty [group('Code quality: linting')] diff --git a/vibetuner-template/.pre-commit-config.yaml b/vibetuner-template/.pre-commit-config.yaml index 14c358be..7ad4d570 100644 --- a/vibetuner-template/.pre-commit-config.yaml +++ b/vibetuner-template/.pre-commit-config.yaml @@ -58,6 +58,6 @@ repos: hooks: - id: lint-po name: lint-po - entry: uvx lint-po + entry: uv run --frozen lint-po language: system files: \.po$ diff --git a/vibetuner-template/pyproject.toml.j2 b/vibetuner-template/pyproject.toml.j2 index 0cc52789..3095ba8d 100644 --- a/vibetuner-template/pyproject.toml.j2 +++ b/vibetuner-template/pyproject.toml.j2 @@ -25,6 +25,7 @@ vibetuner = "vibetuner.cli:app" [dependency-groups] dev = [ "vibetuner[dev]", + "lint-po", ] [build-system] @@ -38,6 +39,10 @@ testpaths = ["tests"] [tool.uv] cache-keys = [{ file = "pyproject.toml" }] +[tool.uv.sources] +# Pin to upstream master until himdel/lint-po cuts a PyPI release +# that includes gettext plural-form support (PRs #3 and #4). +lint-po = { git = "https://github.com/himdel/lint-po", rev = "efadbcaa50f84135ee4f16efa44d99d2662a74b4" } + # To develop against a local copy of vibetuner-py, add: -# [tool.uv.sources] # vibetuner = { path = "packages/vibetuner-py", editable = true }