Re: Let's make it official then... recommend max line length 88
Christian Lorentzen <[email protected]> Tue, 5 Sep 2023 22:23:24 +0200
| Newsgroups | gmane.comp.python.scientific.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 05.09.2023 um 21:25 schrieb [email protected]: 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 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 . 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 _______________________________________________ Hi there As a developer, I just don’t want to care about a line length (nor formatting). Just provide me with tools like black & ruff that do the job for me. Quite ironically, the 88 line length was among the most controversial decisions in scikit-learn, but accepted in the end. I think there are more important topics to spend thoughts to. Just go with the flow, i.e. use the standard setting of black that meanwhile has a wide acceptance. +1 Best Christian _______________________________________________ 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]