-
Notifications
You must be signed in to change notification settings - Fork 3
usethis tool requirements.txt with uv and pre-commit should use URI repo #1130
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Currently the command adds something like this
- id: uv-export
name: uv-export
files: ^uv\.lock$
entry: uv export --frozen --offline --quiet -o=requirements.txt
language: system
pass_filenames: false
require_serial: true
But we can do better by:
- Declaring
uvas the name of its own dependency group, withuvas the dependency in the group - Not including this
uvgroup as a declared default group so it doesn't get installed - Using the URI config:
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.8
hooks:
- id: uv-export
Where 0.9.8 is just whatever the fallback version is
- Ensuring it gets synced by using the config in Add missing config for
sync-with-uv#1015, namely
[tool.sync-with-uv.repo-to-package]
"https://github.com/astral-sh/uv-pre-commit" = "uv"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request