-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix support for pre-commit versions < 3.2.0 #4041
Fix support for pre-commit versions < 3.2.0 #4041
Conversation
Co-authored-by: Cooper Lees <me@cooperlees.com>
Agreed.
True.
Yes, probably sometime in mid-to-late 2024, see #4067 (comment) |
Newer versions of Black only support pre-commit > 3.2.0 and the distro's version may be older. See psf/black#4041 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Newer versions of Black only support pre-commit > 3.2.0 and the distro's version may be older. See psf/black#4041 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Newer versions of Black only support pre-commit > 3.2.0 and the distro's version may be older. See psf/black#4041 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Newer versions of Black only support pre-commit > 3.2.0 and the distro's version may be older. See psf/black#4041 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Can this PR be merged soon? I'm keen to get this fix and aren't in a position to update pre-commit in the environment I'm using. |
Thanks for the PR! However, this situation seems pretty annoying, since specifying these values sounds like it will just break again with a newer pre-commit in a few months. I think we should just revert #3940 , afaict users who care about specific stages can just specify that directly in their own config. Does that sound reasonable, @davidculley? Maybe there's some motivation for that change that I'm missing |
Also note for anyone currently broken by this, you can try using https://github.com/psf/black-pre-commit-mirror instead. This never received that change, so should still work. It'll also make black like 2x faster :-) |
Yes, that sounds reasonable to me. |
Description
This previous change broke support for versions of pre-commit earlier than 3.2.0.
As far as I can tell, there's no reason not to leave these as
commit
,merge-commit
andpush
for now. Eventually they will need to be updated, but the current version of pre-commit supports both sets of values.Checklist - did you ...
CHANGES.md
if necessary?