Repository navigation
Align black pre-commit hook version with requirements.txt - #582
Merged
vimalloc merged 1 commit intoOct 5, 2026
Merged
Conversation
The pre-commit hook pinned black 22.3.0 while requirements.txt pins 23.12.1, so local hooks and the dev environment could format code differently. Bump the hook to 23.12.1 to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
I'll take a look at the black alternatives when I have some time here 👍 |
Contributor
Author
Thanks! If you have any pointers or personal preferences, I’d also be happy to put together a PR. Personally, since switching to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The black pre-commit hook was pinned to
22.3.0, butrequirements.txtpinsblack==23.12.1. So the pre-commit hook and the dev environment could format code differently. Found while working on #581.This PR only aligns the two versions; it doesn't upgrade black. Moving to the latest stable black (
26.10.0) means first deciding what to do about another pre-commit hook:reorder-python-importsdeletes that same blank line. That's true of the pinnedv1.5.0and of the latestv3.17.0.pre-commit run --all-filesnever passes. Currently this affectsflask_jwt_extended/default_callbacks.pyandtests/test_typing.py.Options for a follow-up:
reorder-python-importswithisort(--profile black --force-single-line-imports). This keeps the one-import-per-line style and works with black.reorder-python-imports,flake8and black. A bigger change, but it means fewer tools to maintain.