[PATCH 05 of 12 topics] flake8: fix W503 style

Sean Farley sean at farley.io
Tue Aug 30 23:58:11 EDT 2016


# HG changeset patch
# User Sean Farley <sean at farley.io>
# Date 1472595240 25200
#      Tue Aug 30 15:14:00 2016 -0700
# Node ID 752a62b50ba31b768c52c6b423cd1a36d0c6eae2
# Parent  8f1e18702ba107ffcb35be04dc8a1e650e5c1e7f
# EXP-Topic flake8
flake8: fix W503 style

diff --git a/hgext3rd/topic/destination.py b/hgext3rd/topic/destination.py
--- a/hgext3rd/topic/destination.py
+++ b/hgext3rd/topic/destination.py
@@ -72,12 +72,12 @@ def _destupdatetopic(repo, clean, check)
     if bookmarks.isactivewdirparent(repo):
         movemark = repo['.'].node()
     return node, movemark, None
 
 def desthistedit(orig, ui, repo):
-    if not (ui.config('histedit', 'defaultrev', None) is None
-            and repo.currenttopic):
+    if not (ui.config('histedit', 'defaultrev', None) is None and
+            repo.currenttopic):
         return orig(ui, repo)
     revs = repo.revs('::. and stack()')
     if revs:
         return revs.min()
     return None
@@ -104,13 +104,13 @@ def modsetup(ui):
         extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch)
     try:
         rebase = extensions.find('rebase')
     except KeyError:
         rebase = None
-    if (util.safehasattr(rebase, '_destrebase')
+    if (util.safehasattr(rebase, '_destrebase') and
             # logic not shared with merge yet < hg-3.8
-            and not util.safehasattr(rebase, '_definesets')):
+            not util.safehasattr(rebase, '_definesets')):
         extensions.wrapfunction(rebase, '_destrebase', _destmergebranch)
     if util.safehasattr(destutil, 'destupdatesteps'):
         bridx = destutil.destupdatesteps.index('branch')
         destutil.destupdatesteps.insert(bridx, 'topic')
         destutil.destupdatestepmap['topic'] = _destupdatetopic
diff --git a/hgext3rd/topic/discovery.py b/hgext3rd/topic/discovery.py
--- a/hgext3rd/topic/discovery.py
+++ b/hgext3rd/topic/discovery.py
@@ -14,12 +14,12 @@ from mercurial import (
 )
 
 from . import topicmap
 
 def _headssummary(orig, repo, remote, outgoing):
-    publishing = ('phases' not in remote.listkeys('namespaces')
-                  or bool(remote.listkeys('phases').get('publishing', False)))
+    publishing = ('phases' not in remote.listkeys('namespaces') or
+                  bool(remote.listkeys('phases').get('publishing', False)))
     if publishing or not remote.capable('topics'):
         return orig(repo, remote, outgoing)
     oldrepo = repo.__class__
     oldbranchcache = branchmap.branchcache
     oldfilename = branchmap._filename
diff --git a/hgext3rd/topic/topicmap.py b/hgext3rd/topic/topicmap.py
--- a/hgext3rd/topic/topicmap.py
+++ b/hgext3rd/topic/topicmap.py
@@ -124,12 +124,12 @@ class topiccache(oldbranchcache):
         try:
             if (self.tipnode == repo.changelog.node(self.tiprev)):
                 fh = scmutil.filteredhash(repo, self.tiprev)
                 if fh is None:
                     fh = nullid
-                if ((self.filteredhash == fh)
-                    and (self.phaseshash == _phaseshash(repo, self.tiprev))):
+                if ((self.filteredhash == fh) and
+                    (self.phaseshash == _phaseshash(repo, self.tiprev))):
                     return True
             return False
         except IndexError:
             return False
 
diff --git a/setup.cfg b/setup.cfg
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,2 @@
 [flake8]
-ignore = E261, E266, E302, E129, E731, E124, E713, E301, E501, E111, E123, E222, W503
+ignore = E261, E266, E302, E129, E731, E124, E713, E301, E501, E111, E123, E222


More information about the Mercurial-devel mailing list