Skip to content
This repository was archived by the owner on Jan 25, 2026. It is now read-only.
/ uv-lock-check Public archive

A git hook to validate pyproject.toml and uv.lock files are in sync

License

Notifications You must be signed in to change notification settings

ulgens/uv-lock-check

Repository files navigation

Important

After realizing astral-sh/uv-pre-commit-hook already provides the same functionality, I have decided to deprecate this repository. Please use the mentioned tool instead.


Supported Python versions GitHub Actions Workflow Status

uv-lock-check

A pre-commit hook to validate pyproject.toml and uv.lock files are in sync

Usage

Add the hook to your .pre-commit-config.yaml:

  - repo: https://github.com/ulgens/uv-lock-check
    rev: v0.1.0
    hooks:
      - id: uv-lock-check
        language: python
        additional_dependencies:
          - uv==0.9.26

additional_dependencies definition is optional, but I recommend to match the uv version to your project's uv version, to ensure consistent results. language: python is necessary only if you want to make use of additional_dependencies and Renovate to update the dependency automatically: https://docs.renovatebot.com/modules/manager/pre-commit/#additional-dependencies

Story

The original inline version of this hook was created with the help of https://til.unessa.net/git/pre-commit-hook/

Contributing

This repo solves a very specific need, and I can't think of what could be added or improved. If you can think of any, please feel free to open an issue or a pull request.

Similar Projects

Professional Support 📝

This repo is maintained as part of my ongoing work with CI tools. If your organization needs help with

  • CI/CD pipeline design/improvements
  • Dependency management automation
  • Code quality and linting standards
  • Backend development best practices

or other sort of assistance with a Python project, I'm available for consulting engagements. Connect with me on LinkedIn and let's discover how I can help your team succeed!

About

A git hook to validate pyproject.toml and uv.lock files are in sync

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •