Skip to content

update precommit to use uv-pre-commit #3140

@kevinjqliu

Description

@kevinjqliu

Remove the locally defined uv lock check pre-commit in favor of uv-pre-commit

Remove

- repo: local
hooks:
- id: uv-lock-check
name: uv lock file check
entry: make uv-lock-check
language: system
pass_filenames: false
files: ^(pyproject\.toml|uv\.lock)$

replace with https://github.com/astral-sh/uv-pre-commit?tab=readme-ov-file#using-uv-with-pre-commit

- repo: https://github.com/astral-sh/uv-pre-commit
  # uv version.
  rev: 0.10.9
  hooks:
    # Update the uv lockfile
    - id: uv-lock

may be remove the Makefile definition too

iceberg-python/Makefile

Lines 197 to 203 in 401c297

uv-lock: ## Regenerate uv.lock file from pyproject.toml
uv lock $(PYTHON_ARG)
uv-lock-check: ## Verify uv.lock is up to date
@command -v uv >/dev/null || \
(echo "uv is required. Run 'make install' or 'make install-uv' first." && exit 1)
uv lock --check $(PYTHON_ARG)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions