poetry-lock pre-commit hook does not only check but also updates poetry.lock #7532
Closed
4 tasks done
Labels
status/duplicate
Duplicate issues
Poetry version: 1.3.2
Python version: 3.11.1
OS version and name: Fedora 37
pyproject.toml: N/A
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.Issue
I've added the
poetry-lock
pre-commit hook to my project and was surprised by the behaviour of dependencies being updated when the pre-commit hook run.I expected the hook to only concern itself with whether I'd forgotten to update
poetry.lock
after editingpyproject.toml
, not with additionally updating dependencies.I worked around this by configuring the pre-commit hook as follows:
I think this should be the default behaviour.
For context, there is already a request in #3248 about switching
poetry lock
to behave as if--no-update
is passed by default.The text was updated successfully, but these errors were encountered: