Skip to content
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

Revert "confine pre-commit to stages (#3940)" #4137

Merged
merged 2 commits into from Jan 2, 2024

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Dec 30, 2023

Fixes #4065, closes #4067, closes #4041

See comment in #4041 (comment)

The two possible fixes are both not ideal. Changing the names of the stages guarantees that things will break with new pre-commit later this year. Raising the minimum pre-commit version doesn't make things work for users who currently have issues, it just results in a better error message. Meanwhile, users who want Black to run in specific stages in pre-commit can just specify that themselves, so I think the simplest thing to do is just revert.

I'm open to trying the change later, after pre-commit has released its new breaking change and forced more folks to upgrade (and after we've released the 2024 style)

Copy link
Collaborator

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Agree, I probably shouldn't have merged the original PR as it wasn't too clear what problem it was solving.

@JelleZijlstra JelleZijlstra merged commit b9ad4da into psf:main Jan 2, 2024
43 checks passed
@hauntsaninja hauntsaninja deleted the undo-stages branch January 2, 2024 01:22
@bswck
Copy link

bswck commented Jan 14, 2024

Would you consider releasing this patch to minimize problems caused in old pre-commit installations as explained in the issue this PR fixes (#4065)?

@hauntsaninja
Copy link
Collaborator Author

If you need to be unblocked before the next release is made, just use https://github.com/psf/black-pre-commit-mirror. As a happy side effect, your pre-commit will also run Black 2x faster. The mirror never received the change in #3940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pre-commit: "Expected one of commit, commit-msg, manual, ..." since 23.11.0
3 participants