mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
docs: added pre-commit uv-lock and uv-export hooks to docs (#9872)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan <!-- How was it tested? --> --------- Co-authored-by: Jonne <jonne.haapalainen@gmail.com>
This commit is contained in:
parent
a8772c6944
commit
f5add0ca5e
1 changed files with 21 additions and 0 deletions
|
@ -3,6 +3,27 @@
|
|||
An official pre-commit hook is provided at
|
||||
[`astral-sh/uv-pre-commit`](https://github.com/astral-sh/uv-pre-commit).
|
||||
|
||||
To make sure your `uv.lock` file is up to date even if your `pyproject.toml` file was changed via
|
||||
pre-commit, add the following to the `.pre-commit-config.yaml`:
|
||||
|
||||
```yaml title=".pre-commit-config.yaml"
|
||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||
# uv version.
|
||||
rev: 0.5.8
|
||||
hooks:
|
||||
- id: uv-lock
|
||||
```
|
||||
|
||||
To keep your `requirements.txt` file updated using pre-commit:
|
||||
|
||||
```yaml title=".pre-commit-config.yaml"
|
||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||
# uv version.
|
||||
rev: 0.5.8
|
||||
hooks:
|
||||
- id: uv-export
|
||||
```
|
||||
|
||||
To compile requirements via pre-commit, add the following to the `.pre-commit-config.yaml`:
|
||||
|
||||
```yaml title=".pre-commit-config.yaml"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue