commit 6a32f1a257cc1f7bf7d8499dea7d2a5df5e9d9c0 Author: Damian Johnson atagar@torproject.org Date: Sun Jan 6 20:21:25 2013 -0800
Conforming to E203 (whitespace before ':')
Meh. I'm having trouble thinking of this as either any better or worse. --- stem/response/__init__.py | 2 +- stem/util/connection.py | 4 ++-- test/check_whitespace.py | 2 +- test/unit/response/protocolinfo.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/stem/response/__init__.py b/stem/response/__init__.py index 06c80ca..968fa8d 100644 --- a/stem/response/__init__.py +++ b/stem/response/__init__.py @@ -408,7 +408,7 @@ def _parse_entry(line, quoted, escaped): if start_quote != 0 or end_quote == -1: raise ValueError("the next entry isn't a quoted value: " + line)
- next_entry, remainder = remainder[1 : end_quote], remainder[end_quote + 1:] + next_entry, remainder = remainder[1:end_quote], remainder[end_quote + 1:] else: # non-quoted value, just need to check if there's more data afterward if " " in remainder: next_entry, remainder = remainder.split(" ", 1) diff --git a/stem/util/connection.py b/stem/util/connection.py index 6a0a8d1..c325bd9 100644 --- a/stem/util/connection.py +++ b/stem/util/connection.py @@ -172,7 +172,7 @@ def get_mask(bits): mask_bin = get_binary(2 ** bits - 1, 32)[::-1]
# breaks it into eight character groupings - octets = [mask_bin[8 * i : 8 * (i + 1)] for i in xrange(4)] + octets = [mask_bin[8 * i:8 * (i + 1)] for i in xrange(4)]
# converts each octet into its integer value return ".".join([str(int(octet, 2)) for octet in octets]) @@ -222,7 +222,7 @@ def get_mask_ipv6(bits): mask_bin = get_binary(2 ** bits - 1, 128)[::-1]
# breaks it into sixteen character groupings - groupings = [mask_bin[16 * i : 16 * (i + 1)] for i in xrange(8)] + groupings = [mask_bin[16 * i:16 * (i + 1)] for i in xrange(8)]
# converts each group into its hex value return ":".join(["%04x" % int(group, 2) for group in groupings]).upper() diff --git a/test/check_whitespace.py b/test/check_whitespace.py index 2c2235c..5e05c53 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,E231,E202,E201,E203" + ignored_issues = "E111,E121,W293,E501,E302,E701,E251,E261,W391,E127,E241,E128,E226,E231,E202,E201"
issues = {} pep8_output = system.call("pep8 --ignore %s %s" % (ignored_issues, base_path)) diff --git a/test/unit/response/protocolinfo.py b/test/unit/response/protocolinfo.py index 6bc01eb..23b8173 100644 --- a/test/unit/response/protocolinfo.py +++ b/test/unit/response/protocolinfo.py @@ -139,7 +139,7 @@ class TestProtocolInfoResponse(unittest.TestCase): stem.response.convert("PROTOCOLINFO", control_message)
self.assertEquals(5, control_message.protocol_version) - self.assertEquals(None , control_message.tor_version) + self.assertEquals(None, control_message.tor_version) self.assertEquals((), control_message.auth_methods) self.assertEquals((), control_message.unknown_auth_methods) self.assertEquals(None, control_message.cookie_path)
tor-commits@lists.torproject.org