commit 7b38bbe3d4277e2809e03c5eac47202b9833dfa3 Author: Damian Johnson atagar@torproject.org Date: Sat Aug 16 17:13:09 2014 -0700
Fixing E128 (continuation line under-indented for visual indent)
Mostly complaints about alignment with the parenthese for multi-line conditionals. --- stem/descriptor/server_descriptor.py | 2 +- test/mocking.py | 2 +- test/unit/descriptor/networkstatus/key_certificate.py | 6 +++--- test/unit/descriptor/server_descriptor.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py index c5d24d3..6599e0a 100644 --- a/stem/descriptor/server_descriptor.py +++ b/stem/descriptor/server_descriptor.py @@ -558,7 +558,7 @@ class ServerDescriptor(Descriptor): address = address[1:-1] # remove brackets
if not ((not is_ipv6 and stem.util.connection.is_valid_ipv4_address(address)) or - (is_ipv6 and stem.util.connection.is_valid_ipv6_address(address))): + (is_ipv6 and stem.util.connection.is_valid_ipv6_address(address))): if not validate: continue else: diff --git a/test/mocking.py b/test/mocking.py index e473058..e3715c7 100644 --- a/test/mocking.py +++ b/test/mocking.py @@ -304,7 +304,7 @@ def _get_descriptor_content(attr = None, exclude = (), header_template = (), foo attr = dict(attr) # shallow copy since we're destructive
for content, template in ((header_content, header_template), - (footer_content, footer_template)): + (footer_content, footer_template)): for keyword, value in template: if keyword in exclude: continue diff --git a/test/unit/descriptor/networkstatus/key_certificate.py b/test/unit/descriptor/networkstatus/key_certificate.py index 34e16a8..8d0e828 100644 --- a/test/unit/descriptor/networkstatus/key_certificate.py +++ b/test/unit/descriptor/networkstatus/key_certificate.py @@ -185,9 +185,9 @@ class TestKeyCertificate(unittest.TestCase): test_value = '\n-----BEGIN ID SIGNATURE-----%s-----END UGABUGA SIGNATURE-----' % CRYPTO_BLOB
for field, attr in (('dir-identity-key', 'identity_key'), - ('dir-signing-key', 'signing_key'), - ('dir-key-crosscert', 'crosscert'), - ('dir-key-certification', 'certification')): + ('dir-signing-key', 'signing_key'), + ('dir-key-crosscert', 'crosscert'), + ('dir-key-certification', 'certification')): content = get_key_certificate({field: test_value}, content = True) self.assertRaises(ValueError, KeyCertificate, content)
diff --git a/test/unit/descriptor/server_descriptor.py b/test/unit/descriptor/server_descriptor.py index 96dab1c..97fcde3 100644 --- a/test/unit/descriptor/server_descriptor.py +++ b/test/unit/descriptor/server_descriptor.py @@ -695,8 +695,8 @@ Qlx9HNCqCY877ztFRC624ja2ql6A2hBcuoYMbkHjcQ4= """
desc_text = b'\n'.join((get_bridge_server_descriptor(content = True), - b'or-address 10.45.227.253:9001', - b'or-address [fd9f:2e19:3bcf::02:9970]:443')) + b'or-address 10.45.227.253:9001', + b'or-address [fd9f:2e19:3bcf::02:9970]:443'))
expected_or_addresses = [ ('10.45.227.253', 9001, False),
tor-commits@lists.torproject.org