File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 3
3
An official pre-commit hook is provided at
4
4
[ ` astral-sh/uv-pre-commit ` ] ( https://github.com/astral-sh/uv-pre-commit ) .
5
5
6
+ To make sure your ` uv.lock ` file is up to date even if your ` pyporject.toml ` file was changed via
7
+ pre-commit, add the following to the ` .pre-commit-config.yaml ` :
8
+
9
+ ``` yaml title=".pre-commit-config.yaml"
10
+ - repo : https://github.com/astral-sh/uv-pre-commit
11
+ # uv version.
12
+ rev : 0.5.8
13
+ hooks :
14
+ - id : uv-lock
15
+ ` ` `
16
+
17
+ To keep your ` requirements.txt` file updated using pre-commit:
18
+
19
+ ` ` ` yaml title=".pre-commit-config.yaml"
20
+ - repo: https://github.com/astral-sh/uv-pre-commit
21
+ # uv version.
22
+ rev: 0.5.8
23
+ hooks:
24
+ - id: uv-export
25
+ ` ` `
26
+
6
27
To compile requirements via pre-commit, add the following to the `.pre-commit-config.yaml` :
7
28
8
29
` ` ` yaml title=".pre-commit-config.yaml"
You can’t perform that action at this time.
0 commit comments