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

Running tools through pre-commit #14

Open
eavanvalkenburg opened this issue Aug 22, 2024 · 1 comment
Open

Running tools through pre-commit #14

eavanvalkenburg opened this issue Aug 22, 2024 · 1 comment

Comments

@eavanvalkenburg
Copy link

I would like the ability to use uv tool run ruff with this! Especially ruff and mypy!

@UnknownPlatypus
Copy link
Contributor

I don't understand the point of running uv tool via pre-commit. This seems like adding layers upon layers of indirection.

pre-commit is already a tool designed to install hook in isolated environment, similarly to what uv tool does.

Adding the feature you ask for would mean that pre-commit will create a venv inside which uv is installed to create a venv to install the tool you ask for. Maybe you are looking for https://github.com/tox-dev/pre-commit-uv, this project uses uv to handle the python venv creation inside pre-commit.

For ruff, I would recommended the supported pre-commit hook:

  - repo: https://github.com/charliermarsh/ruff-pre-commit
    rev: v0.6.1
    hooks:
      - id: ruff

For mypy there is https://github.com/pre-commit/mirrors-mypy (but mypy is slow, pre-commit is maybe not the right place to run it)

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

No branches or pull requests

2 participants