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
Black reformat #7967
Black reformat #7967
Conversation
Manage this branch in SquashTest this branch here: https://zerolabchoreblack-configuratio-j43q0.squash.io |
39adb33
to
4c5f9bc
Compare
4c5f9bc
to
3e6e821
Compare
3e6e821
to
4b7101c
Compare
Please remember to add the commit hash to https://github.com/wagtail/wagtail/blob/main/.git-blame-ignore-revs once merged |
Absolutely. As well as instructions for reading WIP PRs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple questions about the configuration and want to suggest we don’t enforce line lengths with flake8 in addition to black, since it doesn’t seem to be very useful.
In addition, should we use black’s --target-version py37
? Trying it out, it was additionally adding trailing commas in a few files.
Finally, with Wagtail having lots of Python code in its documentation, I was wondering if we should run black there (see blackdoc) for consistency? Either in this PR or as a separate follow-up.
4b7101c
to
b4d0fc5
Compare
This: - updates the pre-commit configuration and setup.py testing dependencies - updates isort/flake8 configuration for black - adds black linting to Makefile and CircleCI configuration - updates editorconfig with the new line length (88) for py files - updates python guidelines in docs
b4d0fc5
to
98e78f2
Compare
Looking good! I get no extra reformatting locally, and it seems like all linting is passing in CI. Note I only reviewed some of the code changes a few commits ago – haven’t re-reviewed the reformatting changes since. |
Great stuff @zerolab |
@zerolab Please can we put the 'rebasing PRs' instructions somewhere more easily findable (a wiki page perhaps), and ensure they're fixed and updated as necessary? ( |
Never mind - piecing it together from the instructions on #6059 (comment) now. Will create that wiki page when I'm done :-) |
Gah, I missed |
Fixes #6056
This PR
testing_extras
in setup.py, Makefile and lint job in CircleCI configuration.and finally, reformats with black (and fixes E501 - line length for updated flake8 config)
Rebasing PRs
Based on the methodology from #7908
To-Do
the-commit-after-reformatting
with the reformat commit sha after merge