[CI]: Compare vs. last commit in black CI action #151
Closed
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.
Motivation
Noticed that black wasn't being run in https://github.com/hdmf-dev/hdmf-zarr/actions/runs/7335433157/job/19973345812#step:4:66 , presumably because at the time of a PR the changes have already been committed, see https://pre-commit.com/#usage-in-continuous-integration
I assume it's intended to check if PRs are black-compliant? but isn't currently doing that. I ran a manual check of black and it looks like most of the package isn't either, so this will cause all other PRs to fail until upstream has been black reformatted.
How to test the behavior?
make new PR, make black-noncompliant changes, tests should fail.
Checklist
ruff
from the source directory.