We have a small python script with a handful of external dependencies which we want to run as a local pre-commit hook. To ensure that the dependencies are installed, it would be great to use PEP-723 inline script metadata and use uv run --script to execute the script.
Would it be possible to add a uv-run hook that would allow for this?
This would be helpful since we don't want our developer to have to install uv (as much as I love it of course :D), so ideally this would "just work" behind the scenes.
I am happy to submit a PR if that would be helpful.
Thanks!
(if there are other ways to do the thing outlined above I am all ears)
We have a small python script with a handful of external dependencies which we want to run as a local pre-commit hook. To ensure that the dependencies are installed, it would be great to use PEP-723 inline script metadata and use
uv run --scriptto execute the script.Would it be possible to add a
uv-runhook that would allow for this?This would be helpful since we don't want our developer to have to install
uv(as much as I love it of course :D), so ideally this would "just work" behind the scenes.I am happy to submit a PR if that would be helpful.
Thanks!
(if there are other ways to do the thing outlined above I am all ears)