On 09/03/2014 01:47 PM, Tim Graham wrote: > Ticket #23395 <https://code.djangoproject.com/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.
I support this change to the wording, and your sample long-line fixes look fine. How about just removing the sentence "An exception to PEP 8 is our preference of longer line lengths." With recent updates to PEP 8 to accommodate longer lines, the stated policy is no longer an exception to PEP 8, and I think "preference of longer line lengths" is poorly worded anyway; preference vs what? Nobody prefers longer lines to shorter ones, all else equal (at least I'd hope not). Carl -- 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/54077233.5070802%40oddbird.net. For more options, visit https://groups.google.com/d/optout.
