-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
RFC: Use black for code formatting #1104
Comments
We started using it at work on a large legacy code base a few months ago. The only gotcha we ran into is that we had to pin the black version in our dev requirements, because the output can differ between minor versions while it is in beta. Fixing merge conflicts was pretty straight forward. Rebase, keep my changes, run black, continue rebase. A quick check indicates that the changes will be about half quotes and half line wrapping. |
I've been using |
No objection to this kind of things. The only issue have is that I use Debian Stretch at work and at home (I might go for testing at home before it gets stable), and therefore I work on Python 3.5. Because I never needed to use a more recent Python and because I deploy on 3.5. This might prevent me to run pre-commit (marshmallow-code/webargs#244) unless I use 3.6 to develop using pyenv, which I'd rather avoid. No big deal. I can fix my mess after CI fails on my PRs. |
* Add pyupgrade, black, and blacken-docs pre-commit hooks * Use black's recommended flake8 config: https://github.com/ambv/black/blob/master/.flake8 * Fix a number of issues found by blacken-docs close #1104
@deckar01, this will (hopefully) change soon, when a full release is made, see psf/black#517 |
* Add pyupgrade, black, and blacken-docs pre-commit hooks * Use black's recommended flake8 config: https://github.com/ambv/black/blob/master/.flake8 * Fix a number of issues found by blacken-docs close #1104
Let's spend less time formatting code and let the computer do it.
I've been using black in other projects and it's worked nicely. Integrates with pre-commit, has plugins for all the popular editors.
I've held off on black to avoid creating conflicts for existing PRs. But we have a relatively low number of PRs right now, so maybe now's a good time?
@lafrech @deckar01
The text was updated successfully, but these errors were encountered: