Add black formatting in tox + rev ignore in git blame #244
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.
As part of our effort to standardize our project repos, we are adding black formatting to freshmaker in tox.
This commit:
black --check
in tox, to verify the code is well formatted.git-blame-ignore-revs
file to keep track of large reformatting commits that should be ignored bygit blame
.git-blame-ignore-revs
automatically in a local environmentFor more information, please see the following links:
https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html
https://akrabat.com/ignoring-revisions-with-git-blame/
https://stackoverflow.com/questions/34957237/can-i-configure-git-blame-to-always-ignore-certain-commits-want-to-fix-git-blam/57129540#57129540
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
JIRA: CWFHEALTH-2279
"Testing" remarks
I checked that the CI is runnign without errors and that the new black step is being called:
https://github.com/redhat-exd-rebuilds/freshmaker/actions/runs/6252521416/job/16975967623?pr=244#step:4:1929
I also checked that the blame view in github is ignoring the large reformatting commit.