Skip to content

Hook to sync pre-commit repos with lockfile versions #23

Open
@gresavage

Description

@gresavage

An incredibly useful tool I've become accustomed to with Poetry/PDM is the use of a tool/plugin to sync the tagged pre-commit repo versions with the versions of the tools in the lockfile

See: https://github.com/GabDug/sync-pre-commit-lock

  • implemented as plugin for Poetry/PDM that runs when <poetry / pdm> lock is called
  • configured via pyproject.toml

See: https://github.com/floatingpurr/sync_with_poetry | https://github.com/floatingpurr/sync_with_pdm

  • implemented as pre-commit hook written in Python
  • configured with CLAs + .pre-commit-config.yaml

This way, whenever a tool version is updated the developer doesn't have to manually update the pre-commit config to keep the versions in-sync, especially sync pre-commit autoupdate will only update to the latest repo versions, which might conflict with the actual tool versions pinned by UV

Possibly related to: #17

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