-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 support for ruff-ecosystem
format comparisons with black
#8419
Merged
Conversation
This file contains 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
zanieb
force-pushed
the
zanie/eco-cmp-black
branch
from
November 1, 2023 18:56
5b4a1be
to
defb90e
Compare
PR Check ResultsEcosystem✅ ecosystem check detected no linter changes. ✅ ecosystem check detected no format changes. |
zanieb
force-pushed
the
zanie/eco-cmp-black
branch
2 times, most recently
from
November 1, 2023 20:27
5a46f1b
to
54a3d68
Compare
zanieb
commented
Nov 1, 2023
zanieb
commented
Nov 1, 2023
MichaReiser
approved these changes
Nov 2, 2023
zanieb
force-pushed
the
zanie/eco-format-cmp
branch
from
November 2, 2023 01:14
82c8405
to
eef3b25
Compare
zanieb
force-pushed
the
zanie/eco-cmp-black
branch
from
November 2, 2023 01:18
dfb9960
to
f422ee1
Compare
zanieb
added a commit
that referenced
this pull request
Nov 2, 2023
Previously, the ecosystem checks formatted with the baseline then formatted again with `--diff` to get the changed files. Now, the ecosystem checks support a new mode where we: - Format with the baseline - Commit the changes - Reset to the target ref - Format again - Check the diff from the baseline commit This effectively tests Ruff changes on unformatted code rather than changes in previously formatted code (unless, of course, the project is already using Ruff). While this mode is the new default, I've retained the old one for local checks. The mode can be toggled with `--format-comparison <type>`. Includes some more aggressive resetting of the GitHub repositories when cached. Here, I've also stubbed comparison modes in which `black` is used as the baseline. While these do nothing here, #8419 adds support. I tested this with the commit from #8216 and ecosystem changes appear https://gist.github.com/zanieb/a982ec8c392939043613267474471a6e
zanieb
force-pushed
the
zanie/eco-cmp-black
branch
from
November 2, 2023 01:21
f422ee1
to
85cef61
Compare
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.
Extends #8416 activating the
black-and-ruff
andblack-then-ruff
formatter comparison modes for ecosystem checks allowing us to compare changes to Black across the ecosystem.