-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Consider switching line-length default to 79 chars, per PEP8 #498
Comments
I agree with the @nottrobin. I'm only using Black on some personal projects, and am using the default line length since I'm not that opinionated. However, I would prefer it to default to a 79-char limit, as that's the standard in much of the Python world, including the standard library itself. That said, I can see the argument for bucking the trend—after all, should we blindly stick to tradition forever? It just seems that most Python code I encounter is either limited to 79 characters per line or not formatted at all (and not for reasons Black addresses anyway). Either way, thank you for Black. It solved my personal YAPF config dilemmas once and for all (for now). 🎉 PS.: You might find White amusing. |
Sorry, this is unlikely to happen for the reasons you also found in the readme. |
@zsol No worries. Thanks for your contributions! 🖤 |
This still bugs me. Preferring personal opinion over community standard |
I've read the justification for using 88 chars as the default max-line-length in Black:
I'd like to suggest that this argument isn't strong enough to justify deviating from a strong standard that exists in the Python community and beyond. Not only does PEP8, and therefore Flake8 and almost every existing Python project use 79 chars, but this is also the default in Prettier and is the basis for the 72-character limit in Git commits. (And, conversely to the sarcastic addendum above - who cares if a file is a few lines longer in this day and age?)
I proposed to Canonical's webteam that we follow Black's standard of 88 chars, but our developers rejected the suggestion primarily based on that it's harder to view in their terminals - which is the reason for the 79 char limit in the first place. And so that we don't need to reconfigure all our Flake8-based CI for our projects immediately to be able to start using Black.
Since Black is meant to use sensible defaults and in most cases remain unconfigured, it seems a real shame that it deviates from PEP8 in just this one case, which will almost inevitably lead to a good number of projects that use it having just one config override for
--line-length=79
(as we're planning to do).This is, of course, just my (or rather, our) 2 cents. Please feel free to make whatever choice you feel is right for the project.
The text was updated successfully, but these errors were encountered: