Skip to content

Conversation

sjmonson
Copy link
Collaborator

Summary

Currently if the package requirements change in pyproject.toml the pylock pre-commit hook will fail and require the user to manually apply a pylock update. This change automates the pylock update so the user should only need to add and commit the updated pylock.

Details

  • Update pylock pre-commit hook to attempt to update the pylock file when pdm lock --check fails.

Test Plan

  1. Adjust package dependencies in pyproject.toml
  2. Run pdm run pre-commit run pdm-lock-check --all-files and validate that the pylock changed
  3. Run pdm run pre-commit run pdm-lock-check --all-files and validate that the check passes

  • "I certify that all code in this PR is my own, except as noted below."

Use of AI

  • Includes AI-assisted code completion
  • Includes code generated by an AI application
  • Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes ## WRITTEN BY AI ##)

Signed-off-by: Samuel Monson <smonson@redhat.com>
@jaredoconnell
Copy link
Collaborator

Could this ever trigger a lock change when dependencies do not change?

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

Successfully merging this pull request may close these issues.

2 participants