Install pre-commit with uv
Nice short article
from Adam.
A good reminder that using uv to install tools is a great way to keep the tool up to
date as opposed to installing the tool in each virtual environment.
Below is an excerpt from Adam’s article.
| |
The install command also adds pre-commit-uv, a plugin that patches pre-commit to use uv to install Python-based tools. This drastically speeds up using Python-based hooks, a common use case. (Unfortunately, it seems pre-commit itself won’t be adding uv support.)
With pre-commit installed globally, you can now install its Git hook in relevant repositories per usual:
| |