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

Feature request: Release to PyPI to allow for local pre-commit execution #31

Open
mikeweltevrede opened this issue Dec 24, 2024 · 1 comment

Comments

@mikeweltevrede
Copy link

Hi, I was wondering if you would consider releasing this to PyPI to allow for local execution. This is required for some organizations, where the CI cannot reach out to Github to retrieve the hook.

Example usage for ruff:

repos:
  - repo: local
    hooks:
      - id:             ruff
        name:           Run ruff linter
        entry:          ruff
        args:           [ "check", "--no-cache" ]
        language:       python
        types:          [ file, python ]
        files:          .*\.py$

If I use the following to try and use the regular uv lock (file names are provided to specify it should run only when one of those files is changed):

      - id:             check-uv-lock
        name:           UV lock file check
        entry:          uv lock --check
        language:       python
        files:          pyproject\.toml|uv\.lock

then notice that the file name is passed to the hook and it fails, which is of course the expected behaviour:

UV lock file check.......................................................Failed
- hook id: check-uv-lock
- exit code: 2

error: unexpected argument 'pyproject.toml'' found

Usage: uv lock [OPTIONS]

For more information, try '--help'.

Not providing files does not solve the problem, because then the hook is run on all files and their names are passed to uv lock as well.

@mikeweltevrede
Copy link
Author

@zanieb Good morning :) Would you happen to have been able to consider this request or what is the best way to get this under attention with the correct person?

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

1 participant