Conversation
Greptile OverviewGreptile SummaryThis PR fixes a broken pre-commit hook that was preventing proper validation of the By removing the Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Git as Git Commit
participant PC as Pre-commit
participant UV as uv-lock hook
participant Lock as uv.lock
participant Proj as pyproject.toml
Dev->>Git: git commit (any file changes)
Git->>PC: trigger pre-commit hooks
alt Before fix (with files: ^pyproject\.toml$)
PC->>UV: run uv-lock (only if pyproject.toml changed)
UV->>Proj: check pyproject.toml
UV->>Lock: validate uv.lock is in sync
UV-->>PC: validation result
end
alt After fix (no files restriction)
PC->>UV: run uv-lock (on any commit)
UV->>Proj: check pyproject.toml
UV->>Lock: validate uv.lock is in sync
UV-->>PC: validation result
end
PC-->>Git: allow/block commit
Git-->>Dev: commit success/failure
|
| @@ -11,7 +11,6 @@ repos: | |||
| - id: uv-sync | |||
| args: ["--locked", "--all-extras"] | |||
| - id: uv-lock | |||
There was a problem hiding this comment.
Consider adding files: ^(pyproject\.toml|uv\.lock)$ to make the hook more efficient. Without a file pattern, this hook will run on every commit regardless of which files changed. Adding the pattern (similar to the uv-export hooks below) would trigger validation only when either pyproject.toml or uv.lock changes, which is when validation is actually needed.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .pre-commit-config.yaml
Line: 13:13
Comment:
Consider adding `files: ^(pyproject\.toml|uv\.lock)$` to make the hook more efficient. Without a file pattern, this hook will run on every commit regardless of which files changed. Adding the pattern (similar to the uv-export hooks below) would trigger validation only when either `pyproject.toml` or `uv.lock` changes, which is when validation is actually needed.
How can I resolve this? If you propose a fix, please make it concise.
Description
chore(deps): remove requires-python < 3.13 is not actually obsolete and CI should be failing, but the pre-commit hook which validates it is broken.
How Has This Been Tested?
Confirmed
prek runfails on that branch.Additional Options
Summary by cubic
Fixes the uv-lock pre-commit hook so it runs in CI and correctly fails when pyproject changes require an updated lock or violate requires-python rules. Removed the files filter in .pre-commit-config.yaml to let uv-lock execute without file matching.
Written for commit 605a1ad. Summary will update on new commits.