[tor-commits] [stem/master] Fix 'line break after binary operator' warning

atagar at torproject.org atagar at torproject.org
Sun May 26 19:15:41 UTC 2019


commit 22c44bbcb1298c9e13f74522ebd9c992086a82eb
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun May 26 12:02:13 2019 -0700

    Fix 'line break after binary operator' warning
    
    Honestly I'm unsure what this one is about, but simple to fix...
    
      STATIC CHECKS
      * /home/atagar/Desktop/stem/test/integ/util/system.py
        line 294  - W504 line break after binary operator    | elif not (stem.util.system.is_available('netstat') or
        line 295  - W504 line break after binary operator    | stem.util.system.is_available('sockstat') or
    
    Adding slashes causes a different warning...
    
      STATIC CHECKS
      * /home/atagar/Desktop/stem/test/integ/util/system.py
        line 294  - E502 the backslash is redundant between brackets | elif not (stem.util.system.is_available('netstat') or \
        line 295  - E502 the backslash is redundant between brackets | stem.util.system.is_available('sockstat') or \
    
    ... which is right! That's *why* I didn't have the slashes pycodestyle has
    started warning about. Oh well, whatever - all of these are fine.
---
 test/integ/util/system.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/integ/util/system.py b/test/integ/util/system.py
index 06202bfa..89019685 100644
--- a/test/integ/util/system.py
+++ b/test/integ/util/system.py
@@ -291,9 +291,9 @@ class TestSystem(unittest.TestCase):
     elif stem.util.system.is_mac() or stem.util.system.is_gentoo():
       self.skipTest('(resolvers unavailable)')
       return
-    elif not (stem.util.system.is_available('netstat') or
-              stem.util.system.is_available('sockstat') or
-              stem.util.system.is_available('lsof')):
+    elif not stem.util.system.is_available('netstat') or \
+             stem.util.system.is_available('sockstat') or \
+              stem.util.system.is_available('lsof'):
       self.skipTest('(connection resolvers unavailable)')
       return
 





More information about the tor-commits mailing list