Skip to content

Comments

hooks: add poetry-update hook#8327

Merged
radoering merged 9 commits intopython-poetry:masterfrom
alsmnn:master
Aug 28, 2023
Merged

hooks: add poetry-update hook#8327
radoering merged 9 commits intopython-poetry:masterfrom
alsmnn:master

Conversation

@alsmnn
Copy link
Contributor

@alsmnn alsmnn commented Aug 17, 2023

When switching branches keeping dependencies in sync with the lock file can become cumbersome, because it is easy to forget. Therefore poetry supplies a pre-commit hook, that can take care of it. After switching branches or checking out a file poetry install --sync is invoked and keeps everything nice and tidy.
To make use of that, you need to either supply default_install_hook_types inside of your .pre-commit-config.yaml or you need to manually install them with: pre-commit install --install-hooks -t pre-commit -t post-checkout -t post-merge.

Pull Request Check List

Resolves: #2863

  • Added tests for changed code.
  • Updated documentation for changed code.

@alsmnn
Copy link
Contributor Author

alsmnn commented Aug 25, 2023

Anything else I could improve?

@radoering radoering added the impact/docs Contains or requires documentation changes label Aug 28, 2023
@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Deploy preview for website ready!

✅ Preview
https://website-5dntb1lal-python-poetry.vercel.app

Built with commit b2af90b.
This pull request is being automatically deployed with vercel-action

Copy link
Member

@radoering radoering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. If @finswimmer agrees we can merge it.

Aljoscha Gerber and others added 9 commits August 28, 2023 17:57
When switching branches keeping dependencies in sync with the lock file
can become cumbersome, because it is easy to forget. Therefore poetry
supplies a pre-commit hook, that can take care of it.
After switching branches or checking out a file `poetry install --sync`
is invoked and keeps everything nice and tidy.
To make use of that, you need to either supply `default_install_hook_types`
inside of your `.pre-commit-config.yaml` or you need to manually install
them with: `pre-commit install --install-hooks -t pre-commit -t post-checkout -t
post-merge`.
@radoering radoering enabled auto-merge (squash) August 28, 2023 16:04
@radoering radoering merged commit d0bd8a8 into python-poetry:master Aug 28, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

impact/docs Contains or requires documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pre-commit hooks to always be sync after a git checkout

4 participants