Patchwork [1,of,4] cleanup: remove superfluous space after space after equals (python)

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 5, 2016, 6:08 a.m.
Message ID <775f9d7fb57c514b7f05.1451974091@waste.org>
Download mbox | patch
Permalink /patch/12522/
State Accepted
Headers show

Comments

timeless@mozdev.org - Jan. 5, 2016, 6:08 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1451549819 0
#      Thu Dec 31 08:16:59 2015 +0000
# Node ID 775f9d7fb57c514b7f05a117b73e962a3d497a7c
# Parent  b8405d739149cdd6d8d9bd5e3dd2ad8487b1f09a
cleanup: remove superfluous space after space after equals (python)

Patch

diff --git a/contrib/dirstatenonnormalcheck.py b/contrib/dirstatenonnormalcheck.py
--- a/contrib/dirstatenonnormalcheck.py
+++ b/contrib/dirstatenonnormalcheck.py
@@ -33,7 +33,7 @@ 
 def _checkdirstate(orig, self, arg):
     """Check nonnormal set consistency before and after the call to orig"""
     checkconsistency(self._ui, orig, self._map, self._nonnormalset, "before")
-    r =  orig(self, arg)
+    r = orig(self, arg)
     checkconsistency(self._ui, orig, self._map, self._nonnormalset, "after")
     return r
 
diff --git a/hgext/highlight/highlight.py b/hgext/highlight/highlight.py
--- a/hgext/highlight/highlight.py
+++ b/hgext/highlight/highlight.py
@@ -25,7 +25,7 @@ 
     # append a <link ...> to the syntax highlighting css
     old_header = tmpl.load('header')
     if SYNTAX_CSS not in old_header:
-        new_header =  old_header + SYNTAX_CSS
+        new_header = old_header + SYNTAX_CSS
         tmpl.cache['header'] = new_header
 
     text = fctx.data()
diff --git a/hgext/zeroconf/Zeroconf.py b/hgext/zeroconf/Zeroconf.py
--- a/hgext/zeroconf/Zeroconf.py
+++ b/hgext/zeroconf/Zeroconf.py
@@ -150,7 +150,7 @@ 
 _TYPE_TXT = 16
 _TYPE_AAAA = 28
 _TYPE_SRV = 33
-_TYPE_ANY =  255
+_TYPE_ANY = 255
 
 # Mapping constants to names
 
@@ -522,7 +522,7 @@ 
 	def readString(self, len):
 		"""Reads a string of a given length from the packet"""
 		format = '!' + str(len) + 's'
-		length =  struct.calcsize(format)
+		length = struct.calcsize(format)
 		info = struct.unpack(format, self.data[self.offset:self.offset+length])
 		self.offset += length
 		return info[0]
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -117,7 +117,7 @@ 
         diffopts.nodates = True
         diffopts.git = True
         diffopts.showfunc = True
-        originaldiff =  patch.diff(repo, changes=status, opts=diffopts)
+        originaldiff = patch.diff(repo, changes=status, opts=diffopts)
         originalchunks = patch.parsepatch(originaldiff)
 
         # 1. filter patch, so we have intending-to apply subset of it
@@ -2644,7 +2644,7 @@ 
                                  extra=extra,
                                  editor=editor)
 
-            newdesc =  changelog.stripdesc(new.description())
+            newdesc = changelog.stripdesc(new.description())
             if ((not node)
                 and newdesc == old.description()
                 and user == old.user()
@@ -3198,9 +3198,9 @@ 
         diffopts = patch.difffeatureopts(repo.ui, whitespace=True)
         diffopts.nodates = True
         diffopts.git = True
-        reversehunks =  repo.ui.configbool('experimental',
-                                           'revertalternateinteractivemode',
-                                           True)
+        reversehunks = repo.ui.configbool('experimental',
+                                          'revertalternateinteractivemode',
+                                          True)
         if reversehunks:
             diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts)
         else:
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3117,7 +3117,7 @@ 
             manifestonly = manifestfiles - dirstatefiles
             dsonly = dirstatefiles - manifestfiles
             dsnotadded = set(f for f in dsonly if dirstate[f] != 'a')
-            changedfiles =  manifestonly | dsnotadded
+            changedfiles = manifestonly | dsnotadded
 
         dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
     finally:
@@ -5493,7 +5493,7 @@ 
             brev = checkout
             movemarkfrom = None
             if not checkout:
-                updata =  destutil.destupdate(repo)
+                updata = destutil.destupdate(repo)
                 checkout, movemarkfrom, brev = updata
             ret = hg.update(repo, checkout)
         except error.UpdateAbort as inst:
@@ -6929,7 +6929,7 @@ 
         if check:
             cmdutil.bailifchanged(repo, merge=False)
         if rev is None:
-            updata =  destutil.destupdate(repo, clean=clean, check=check)
+            updata = destutil.destupdate(repo, clean=clean, check=check)
             rev, movemarkfrom, brev = updata
 
         repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -389,8 +389,8 @@ 
         extra = {}
     if branch:
         extra['branch'] = encoding.fromlocal(branch)
-    ctx =  memctx(repo, parents, text, files, getfilectx, user,
-                          date, extra, editor)
+    ctx = memctx(repo, parents, text, files, getfilectx, user,
+                 date, extra, editor)
     return ctx
 
 class changectx(basectx):
diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -45,7 +45,7 @@ 
     '''return module with given extension name'''
     mod = None
     try:
-        mod =  _extensions[name]
+        mod = _extensions[name]
     except KeyError:
         for k, v in _extensions.iteritems():
             if k.endswith('.' + name) or k.endswith('/' + name):
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -52,7 +52,7 @@ 
     if not hashbranch and not branches:
         x = revs or None
         if util.safehasattr(revs, 'first'):
-            y =  revs.first()
+            y = revs.first()
         elif revs:
             y = revs[0]
         else:
diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -254,7 +254,7 @@ 
                 os.unlink(filename)
 
     def _callcompressable(self, cmd, **args):
-        stream =  self._callstream(cmd, **args)
+        stream = self._callstream(cmd, **args)
         return util.chunkbuffer(zgenerator(stream))
 
     def _abort(self, exception):
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -130,7 +130,7 @@ 
     def parseindex(self, data, inline):
         s = self.size
         index = []
-        nodemap =  {nullid: nullrev}
+        nodemap = {nullid: nullrev}
         n = off = 0
         l = len(data)
         while off + s <= l:
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2290,7 +2290,7 @@ 
     elif op == 'not':
         # Optimize not public() to _notpublic() because we have a fast version
         if x[1] == ('func', ('symbol', 'public'), None):
-            newsym =  ('func', ('symbol', '_notpublic'), None)
+            newsym = ('func', ('symbol', '_notpublic'), None)
             o = optimize(newsym, not small)
             return o[0], o[1]
         else:
diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -832,7 +832,7 @@ 
     paths = templatepaths()
     if not paths:
         return _('no templates found, try `hg debuginstall` for more info')
-    dirlist =  os.listdir(paths[0])
+    dirlist = os.listdir(paths[0])
     stylelist = []
     for file in dirlist:
         split = file.split(".")
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -210,7 +210,7 @@ 
     kw = dict([[t.strip() for t in l.split(':', 1)]
                for l in open('.hg_archival.txt')])
     if 'tag' in kw:
-        version =  kw['tag']
+        version = kw['tag']
     elif 'latesttag' in kw:
         if 'changessincelatesttag' in kw:
             version = '%(latesttag)s+%(changessincelatesttag)s-%(node).12s' % kw
@@ -500,7 +500,7 @@ 
             rest = self.install_dir[len(common):]
             uplevel = len([n for n in os.path.split(rest) if n])
 
-            libdir =  uplevel * ('..' + os.sep) + self.install_lib[len(common):]
+            libdir = uplevel * ('..' + os.sep) + self.install_lib[len(common):]
 
         for outfile in self.outfiles:
             fp = open(outfile, 'rb')
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1272,7 +1272,7 @@ 
         self.warned = []
 
         self.times = []
-        self._firststarttime =  None
+        self._firststarttime = None
         # Data stored for the benefit of generating xunit reports.
         self.successes = []
         self.faildata = {}
diff --git a/tests/test-manifest.py b/tests/test-manifest.py
--- a/tests/test-manifest.py
+++ b/tests/test-manifest.py
@@ -187,7 +187,7 @@ 
 
     def testCopy(self):
         m = self.parsemanifest(A_SHORT_MANIFEST)
-        m['a'] =  BIN_HASH_1
+        m['a'] = BIN_HASH_1
         m2 = m.copy()
         del m
         del m2 # make sure we don't double free() anything
diff --git a/tests/test-parseindex2.py b/tests/test-parseindex2.py
--- a/tests/test-parseindex2.py
+++ b/tests/test-parseindex2.py
@@ -22,7 +22,7 @@ 
     s = 64
     cache = None
     index = []
-    nodemap =  {nullid: nullrev}
+    nodemap = {nullid: nullrev}
     n = off = 0
 
     l = len(data) - s
diff --git a/tests/tinyproxy.py b/tests/tinyproxy.py
--- a/tests/tinyproxy.py
+++ b/tests/tinyproxy.py
@@ -29,7 +29,7 @@ 
     rbufsize = 0                        # self.rfile Be unbuffered
 
     def handle(self):
-        (ip, port) =  self.client_address
+        (ip, port) = self.client_address
         allowed = getattr(self, 'allowed_clients', None)
         if allowed is not None and ip not in allowed:
             self.raw_requestline = self.rfile.readline()