[tor-commits] [stem/master] Skipping E111 and E121 (four space indentations)

atagar at torproject.org atagar at torproject.org
Mon Jan 7 09:08:00 UTC 2013


commit 44c018886e0ff43e7eb42f7ec34402a301d40cbf
Author: Damian Johnson <atagar at torproject.org>
Date:   Mon Jan 7 00:48:21 2013 -0800

    Skipping E111 and E121 (four space indentations)
    
    I strongly prefer two space indentations. It reads perfectly well and leads to
    shorter lines. I've never heard a coherent argument why four spaces, eight
    spaces, tabs, or any of the other measurement is actually superior.
    
    When it comes to this bike shed I'm keeping the color as it is for now.
---
 test/check_whitespace.py |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/test/check_whitespace.py b/test/check_whitespace.py
index 2e8b679..da81cae 100644
--- a/test/check_whitespace.py
+++ b/test/check_whitespace.py
@@ -34,24 +34,15 @@ def pep8_issues(base_path = DEFAULT_TARGET):
   :returns: dict of the form ``path => [(line_number, message)...]``
   """
 
-  # pep8 give output of the form...
+  # The pep8 command give output of the form...
   #
   #   FILE:LINE:CHARACTER ISSUE
   #
   # ... for instance...
   #
   #   ./test/mocking.py:868:31: E225 missing whitespace around operator
-
-  # TODO: Presently this is a list of all issues pep8 complains about in stem.
-  # We're gonna trim these down by cateogry but include the pep8 checks to
-  # prevent regression.
-
-  # Ignoring the following compliance issues.
-  #
-  # * E127 continuation line over-indented for visual indent
   #
-  #   Pep8 only works with this one if we have four space indents (its
-  #   detection is based on multiples of four).
+  # Ignoring the following compliance issues.
   #
   # * E251 no spaces around keyword / parameter equals
   #
@@ -67,8 +58,17 @@ def pep8_issues(base_path = DEFAULT_TARGET):
   #   things far less readable, encouraging bad practices like abbreviated
   #   variable names.
   #
-  #   If the code fits on my tiny netbook screen then it's probably narrow
-  #   enough.
+  #   If the code fits on my tiny netbook screen then it's narrow enough.
+  #
+  # * E111 and E121 four space indentations
+  #
+  #   Ahhh, indentation. The holy war that'll never die. Sticking with two
+  #   space indentations since it leads to shorter lines.
+  #
+  # * E127 continuation line over-indented for visual indent
+  #
+  #   Pep8 only works with this one if we have four space indents (its
+  #   detection is based on multiples of four).
 
   ignored_issues = "E111,E121,E501,E251,E127"
 





More information about the tor-commits mailing list