+1 It is a good idea to have some limit on line lengths. There are some exceptions where longer lines improve readability, but in those rare cases we can just use # noqa.
- Anssi On Wed, 2014-09-03 at 12:47 -0700, Tim Graham wrote: > Ticket #23395 raised the issue that our contributing guidelines is not > exactly clear regarding long lines. Currently it says, > > > "One big exception to PEP 8 is our preference of longer line lengths. > We’re well into the 21st Century, and we have high-resolution computer > screens that can fit way more than 79 characters on a screen. Don’t > limit lines of code to 79 characters if it means the code looks > significantly uglier or is harder to read." > > I'd like to propose changing it like this: > > "An exception to PEP 8 is our preference of longer line lengths. Don’t > limit lines of code to 79 characters if it means the code looks > significantly uglier or is harder to read. Up to 119 characters is > okay as this is the width of GitHub code review; anything longer > requires horizontal scrolling which makes review more difficult. This > check is included when you run flake8. Documentation, comments, and > docstrings should be wrapped at 79 characters." > > > The biggest hurdle is cleaning up the existing code as we currently > have ~1700 lines longer than that. I attached an initial patch on the > ticket to show how long strings can be restructured. If there is no > objection, perhaps I can work with some afraid-to-commit workshop > participants to divvy up the work. flake8 fixes were a big hit last > time. > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/1409812069.11410.627.camel%40TTY32. For more options, visit https://groups.google.com/d/optout.
