[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Conforming to E226 (missing optional whitespace around operator)



commit b8b32e0aa751d8f2c2fbe43502b1f400871f0919
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Jan 6 20:29:16 2013 -0800

    Conforming to E226 (missing optional whitespace around operator)
    
    Another nice one.
---
 stem/descriptor/server_descriptor.py |    4 ++--
 test/check_whitespace.py             |    2 +-
 test/mocking.py                      |    6 +++---
 test/unit/util/proc.py               |    4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index e51de8b..a1b486d 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -488,7 +488,7 @@ class ServerDescriptor(stem.descriptor.Descriptor):
             else: raise ValueError("or-address line missing a colon: %s" % line)
           
           div = entry.rfind(":")
-          address, ports = entry[:div], entry[div+1:]
+          address, ports = entry[:div], entry[div + 1:]
           is_ipv6 = address.startswith("[") and address.endswith("]")
           if is_ipv6: address = address[1:-1] # remove brackets
           
@@ -715,7 +715,7 @@ class RelayDescriptor(ServerDescriptor):
     except ValueError:
       raise ValueError("Verification failed, seperator not found")
     
-    digest = decrypted_bytes[seperator_index+1:]
+    digest = decrypted_bytes[seperator_index + 1:]
     
     # The local digest is stored in uppercase hex;
     #  - so decode it from hex
diff --git a/test/check_whitespace.py b/test/check_whitespace.py
index b566106..0671d65 100644
--- a/test/check_whitespace.py
+++ b/test/check_whitespace.py
@@ -47,7 +47,7 @@ def pep8_issues(base_path = DEFAULT_TARGET):
   # We're gonna trim these down by cateogry but include the pep8 checks to
   # prevent regression.
   
-  ignored_issues = "E111,E121,W293,E501,E302,E701,E251,E261,W391,E127,E241,E128,E226"
+  ignored_issues = "E111,E121,W293,E501,E302,E701,E251,E261,W391,E127,E241,E128"
   
   issues = {}
   pep8_output = system.call("pep8 --ignore %s %s" % (ignored_issues, base_path))
diff --git a/test/mocking.py b/test/mocking.py
index ef4a209..99f18b2 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -880,7 +880,7 @@ def sign_descriptor_content(desc_content):
     grouped_fingerprint = ""
     
     for x in range(0, len(key_hash), 4):
-      grouped_fingerprint += " " + key_hash[x:x+4]
+      grouped_fingerprint += " " + key_hash[x:x + 4]
       fingerprint_token = "\nfingerprint"
       new_fp = fingerprint_token + grouped_fingerprint
       
@@ -894,8 +894,8 @@ def sign_descriptor_content(desc_content):
     # if the descriptor does not already contain a fingerprint do not add one
     
     if ft_start >= 0:
-      ft_end = desc_content.find("\n", ft_start+1)
-      desc_content = desc_content[:ft_start]+new_fp+desc_content[ft_end:]
+      ft_end = desc_content.find("\n", ft_start + 1)
+      desc_content = desc_content[:ft_start] + new_fp + desc_content[ft_end:]
     
     # create a temporary object to use to calculate the digest
     
diff --git a/test/unit/util/proc.py b/test/unit/util/proc.py
index 3cad349..13942b4 100644
--- a/test/unit/util/proc.py
+++ b/test/unit/util/proc.py
@@ -33,7 +33,7 @@ class TestProc(unittest.TestCase):
       ('/proc/meminfo', 'MemTotal:', 'system physical memory'): 'MemTotal:       12345 kB',
     }))
     
-    self.assertEquals((12345*1024), proc.get_physical_memory())
+    self.assertEquals((12345 * 1024), proc.get_physical_memory())
   
   def test_get_cwd(self):
     """
@@ -70,7 +70,7 @@ class TestProc(unittest.TestCase):
     }))
     
     self.assertEqual((0, 0), proc.get_memory_usage(0))
-    self.assertEqual((100*1024, 1800*1024), proc.get_memory_usage(1111))
+    self.assertEqual((100 * 1024, 1800 * 1024), proc.get_memory_usage(1111))
   
   def test_get_stats(self):
     """



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits