Re: Let's make it official then... recommend max line length 88
[email protected] Tue, 5 Sep 2023 15:22:53 -0400
| Newsgroups | gmane.comp.python.scientific.devel |
|---|---|
| Message-ID | <CAMMTP+CZ1cGUt1w3adpQ=dJqbAS5em+Nzc+ooGvxWhUbWddUyQ@mail.gmail.com> |
On Tue, Sep 5, 2023 at 2:59 PM Ralf Gommers <[email protected]> wrote: > > > On Tue, Sep 5, 2023 at 6:42 PM Stefan van der Walt <[email protected]> > wrote: > >> Hi Josef, >> >> On Tue, Sep 5, 2023, at 08:58, [email protected] wrote: >> >> Why 88? >> >> >> The black docs >> <https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length> >> provide a rationalization: >> >> *Black* defaults to 88 characters per line, which happens to be 10% over >> 80. This number was found to produce significantly shorter files than >> sticking with 80 (the most popular), or even 79 (used by the standard >> library). In general, 90-ish seems like the wise choice >> <https://youtu.be/wf-BqAjZb8M?t=260>. >> >> >> I'm fine with 88 myself. The only concern I've heard is from a developer >> who stacks three terminals horizontally. But we're a long way removed from >> the original 80-character terminal width. >> > > I'm +1 because of that statistic. It matches my experience with our linter > tool. More often than not when it fails, it's because lines are in the > 80-83 char range. Having to break lines sensibly just to appease the linter > is pretty annoying - fewer failures is better. > I don't think that will really change with the line limit. It's always annoying having to break a line because of 1 or 2 characters, whatever that limit is. About statistics: blackened code needs the extra spaces to compensate for extra whitespace requirements 5**2, 1/2 :) > And especially because our current line length is <80 now and we're not > reformatting that, bumping the limit by 8 characters will make a very large > difference in the number of linter failures. > > Cheers, > Ralf > > _______________________________________________ > SciPy-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/scipy-dev.python.org/ > Member address: [email protected] > _______________________________________________ SciPy-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/scipy-dev.python.org/ Member address: [email protected]