-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pre-commit hook to check poetry lock #6450
Conversation
33ce252
to
ecc2695
Compare
ecc2695
to
d5ddb87
Compare
Co-authored-by: Mathieu Kniewallner <[email protected]>
d5ddb87
to
2ffdae5
Compare
@neersighted I'd like to see that backported to |
I'm not 100% sure on this just yet -- or rather I'm not sure on the future of pre-commit hooks in this repo given that upstream is incompatible with our release cycle. But I suppose that should not necessarily stop us from improving the hooks in this repo -- it's just that I hesitate to show more support/commitment for them when they may not be viable in the long run. |
Makes sense. I've removed my review and added Happy to discuss that further if needed. |
Could you clarify what you mean by "upstream is incompatible with our release cycle"? You mean that pre-commit hooks are tied to git refs rather than Poetry releases? Or something else I'm misunderstanding? |
I guess @neersighted is talking about the fact, that |
Correct -- we may need to provide pre-commit support through a different repo with a different approach to history. |
I see. Thanks for clarifying. Prior to this repo having pre-commit hooks defined, I set up https://github.com/medigateio/poetry-pre-commit for doing the same thing internally at my company (also using the 3rd-party |
Hey @neersighted , what are your thoughts on merging this? I'm also happy to help with setting up a separate repo for the pre-commit hooks to fix the autoupdate issue, if you'd like. |
Actually, I see that maybe all of the features of this PR were added upstream. The only thing that remains is a hook that runs I'll close this PR. |
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. |
This PR fixes a few things with the repo's pre-commit hooks:
files
regex - escape.
.Addfiles
topoetry-lock
, so that it doesn't run on every commitRemovelanguage_version: python3
.Including this overrides a top-leveldefault_language_version
directive, for no real benefit.poetry lock --check
Edit: removed features that are already upstream.