Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add 'uv-run' hook #42

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Jan 31, 2025

There are two obvious use cases for having a uv run pre-commit hook:

  1. Launching python scripts with inline-dependencies (PEP-723), see Add uv-run hook #37 (comment) for detailed example.
  2. Launching tools (the most obvious is mypy, as described in details in ) within the project environment. Running tools through pre-commit #14 (comment)

The main disadvantages to using the uv-run hook as defined in this PR is that it won't work on pre-commit.ci service since it needs network access, which is forbidden during hook execution on pre-commit.ci service. But that is the case for other hooks in this repo as well.

TODO:

  • Documentation

Closes #37. Closes #14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add uv-run hook Running tools through pre-commit
1 participant