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
uv as the name of its own dependency group, with uv as the dependency in the group
- Not including this
uv group 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
[tool.sync-with-uv.repo-to-package]
"https://github.com/astral-sh/uv-pre-commit" = "uv"
Currently the command adds something like this
But we can do better by:
uvas the name of its own dependency group, withuvas the dependency in the groupuvgroup as a declared default group so it doesn't get installedWhere 0.9.8 is just whatever the fallback version is
sync-with-uv#1015, namely