add make patch to run all the things#19999
Open
dstufft wants to merge 1 commit into
Open
Conversation
miketheman
reviewed
May 4, 2026
Member
miketheman
left a comment
There was a problem hiding this comment.
This feels like it's duplicating 2/3 of the current pre-commit configuration https://github.com/pypi/warehouse/blob/994ebdd30a581e595f93d3f0ef9ad39ab11f5cf0/.pre-commit-config.yaml
Why not consolidate on that approach, and suggest users use either prek or pre-commit instead?
Member
Author
|
Users would need to install |
Member
Author
|
FWIW I've had this as a local patch for a few years now and I don't think it's ever changed since I first wrote it 😅 |
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.
Whenever you're making a PR there are a few things that you're supposed to run like linting, formatting, and translations. Currently these are treated as distinct steps (which is useful when you only want one of them) but you're really supposed to run all 3 before you make a PR.
However, it's easy to forget to run one of them (often times translations!) and the order that you run them in can matter (if you run linting first, you may get errors that reformat would fix, if you don't run translations last you may need to re-run it if reformating changed the line numbers around).
This wraps all of that up in a single command,
make patchthat you can run and it'll do the formatting, linting, and translations all in one shot. It re-uses the existingbin/whatevercommands so we're not re-defining what it means to format/lint/translate/etc, just giving an easy way to run them all in the ideal order.