You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Combining poetry and pre-commit can be very powerful. Currently both are being used somewhat in isolation from each other.
There are a collection of poetry specific pre-commit hooks that can be used to ensure poetry configuration is correct before a commit.
Details
More information on the poetry hooks can be found here.
I would suggest using:
poetry-check - checks the config is valid
poetry-lock - runs poetry lock ahead of a commit to ensure the lock file is up to date*
*You may only want to use the poetry-lock command on merge checks as I would have thought it would be quite rare the requirements will change. This might be easier to implement as a check on git-push to the develop branch.
Description of the proposal
Combining
poetry
andpre-commit
can be very powerful. Currently both are being used somewhat in isolation from each other.There are a collection of
poetry
specificpre-commit
hooks that can be used to ensurepoetry
configuration is correct before a commit.Details
More information on the
poetry
hooks can be found here.I would suggest using:
poetry-check
- checks the config is validpoetry-lock
- runspoetry lock
ahead of a commit to ensure the lock file is up to date**You may only want to use the
poetry-lock
command on merge checks as I would have thought it would be quite rare the requirements will change. This might be easier to implement as a check on git-push to the develop branch.Example
It would look something like the following:
Impact
There will be a slight time increase due to any additions but it should be pretty negligible compared to say
mypy
which is painfully slow at times.The text was updated successfully, but these errors were encountered: