From da7b04904c3000f137f9b2559f9bb55b28d0a3b7 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 29 May 2018 08:28:08 -0700 Subject: [PATCH] Limit lines to 130 chracters (#2169) Fixes #2124. As mentioned in the issue, the current guidelines lead to extremely long lines of many hundreds of characters, which make code hard to read and review. I think there should be some limit to line length, but it's OK for stubs to have somewhat longer lines than normal code. For reference, there are currently 115 lines in typeshed over 200 characters; 523 over 120 characters; and 2980 over 79 characters. We picked 130 because that's the longest line GitHub displays on a 13" laptop in a unified diff without folding. There are currently 382 lines in typeshed that are over 130 characters. --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 826764474..994698cca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -185,8 +185,7 @@ you should know about. Style conventions for stub files are different from PEP 8. The general rule is that they should be as concise as possible. Specifically: -* there is no line length limit; -* prefer long lines over elaborate indentation; +* lines can be up to 130 characters long; * all function bodies should be empty; * prefer ``...`` over ``pass``; * prefer ``...`` on the same line as the class/function signature;