Fix various whitespace issues reported by pyflakes

- E201 whitespace after '['
- E202 whitespace before '}'
- E221 multiple spaces before operator
- E222 multiple spaces after operator
- E225 missing whitespace around operator
- E226 missing whitespace around arithmetic operator
- E231 missing whitespace after ','
- E261 at least two spaces before inline comment
- E271 multiple spaces after keyword

Fixed automatically with autopep8:

  git ls-files | grep py$ | xargs autopep8 --in-place \
    --select E201,E202,E221,E222,E225,E226,E231,E261,E271

Change-Id: I367113eb8c847eb460532c7c2f8643f33040308c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254601
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: David Pursehouse <dpursehouse@collab.net>
diff --git a/subcmds/abandon.py b/subcmds/abandon.py
index cd1d0c4..ba4ef09 100644
--- a/subcmds/abandon.py
+++ b/subcmds/abandon.py
@@ -79,10 +79,10 @@
 
     if err:
       for br in err.keys():
-        err_msg = "error: cannot abandon %s" %br
+        err_msg = "error: cannot abandon %s" % br
         print(err_msg, file=sys.stderr)
         for proj in err[br]:
-          print(' '*len(err_msg) + " | %s" % proj.relpath, file=sys.stderr)
+          print(' ' * len(err_msg) + " | %s" % proj.relpath, file=sys.stderr)
       sys.exit(1)
     elif not success:
       print('error: no project has local branch(es) : %s' % nb,
@@ -95,5 +95,5 @@
           result = "all project"
         else:
           result = "%s" % (
-            ('\n'+' '*width + '| ').join(p.relpath for p in success[br]))
-        print("%s%s| %s\n" % (br,' '*(width-len(br)), result),file=sys.stderr)
+            ('\n' + ' ' * width + '| ').join(p.relpath for p in success[br]))
+        print("%s%s| %s\n" % (br, ' ' * (width - len(br)), result), file=sys.stderr)
diff --git a/subcmds/branches.py b/subcmds/branches.py
index b895884..b4894ec 100644
--- a/subcmds/branches.py
+++ b/subcmds/branches.py
@@ -23,7 +23,7 @@
   def __init__(self, config):
     Coloring.__init__(self, config, 'branch')
     self.current = self.printer('current', fg='green')
-    self.local   = self.printer('local')
+    self.local = self.printer('local')
     self.notinproject = self.printer('notinproject', fg='red')
 
 class BranchInfo(object):
@@ -170,11 +170,11 @@
           fmt = out.current if i.IsCurrent else out.write
           for p in paths:
             out.nl()
-            fmt(width*' ' + '          %s' % p)
+            fmt(width * ' ' + '          %s' % p)
           fmt = out.write
           for p in non_cur_paths:
             out.nl()
-            fmt(width*' ' + '          %s' % p)
+            fmt(width * ' ' + '          %s' % p)
       else:
         out.write(' in all projects')
       out.nl()
diff --git a/subcmds/cherry_pick.py b/subcmds/cherry_pick.py
index bd396fa..8d81be3 100644
--- a/subcmds/cherry_pick.py
+++ b/subcmds/cherry_pick.py
@@ -97,7 +97,7 @@
 
   def _StripHeader(self, commit_msg):
     lines = commit_msg.splitlines()
-    return "\n".join(lines[lines.index("")+1:])
+    return "\n".join(lines[lines.index("") + 1:])
 
   def _Reformat(self, old_msg, sha1):
     new_msg = []
diff --git a/subcmds/forall.py b/subcmds/forall.py
index 131ba67..9706760 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -195,7 +195,7 @@
       cmd.append(cmd[0])
     cmd.extend(opt.command[1:])
 
-    if  opt.project_header \
+    if opt.project_header \
     and not shell \
     and cmd[0] == 'git':
       # If this is a direct git command that can enable colorized
diff --git a/subcmds/info.py b/subcmds/info.py
index cff97fb..a6faf16 100644
--- a/subcmds/info.py
+++ b/subcmds/info.py
@@ -204,7 +204,7 @@
 
       for commit in commits:
         split = commit.split()
-        self.text('{0:38}{1} '.format('','-'))
+        self.text('{0:38}{1} '.format('', '-'))
         self.sha(split[0] + " ")
         self.text(" ".join(split[1:]))
         self.out.nl()
diff --git a/subcmds/init.py b/subcmds/init.py
index a795006..191f02b 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -349,7 +349,7 @@
 
     while True:
       print()
-      name  = self._Prompt('Your Name', mp.UserName)
+      name = self._Prompt('Your Name', mp.UserName)
       email = self._Prompt('Your Email', mp.UserEmail)
 
       print()
diff --git a/subcmds/list.py b/subcmds/list.py
index 231da94..1cd971e 100644
--- a/subcmds/list.py
+++ b/subcmds/list.py
@@ -76,7 +76,7 @@
     lines = []
     for project in projects:
       if opt.name_only and not opt.path_only:
-        lines.append("%s" % ( project.name))
+        lines.append("%s" % (project.name))
       elif opt.path_only and not opt.name_only:
         lines.append("%s" % (_getpath(project)))
       else:
diff --git a/subcmds/start.py b/subcmds/start.py
index 6ec0b2c..9b81086 100644
--- a/subcmds/start.py
+++ b/subcmds/start.py
@@ -60,7 +60,7 @@
     if not opt.all:
       projects = args[1:]
       if len(projects) < 1:
-        projects = ['.',]  # start it in the local project by default
+        projects = ['.']  # start it in the local project by default
 
     all_projects = self.GetProjects(projects,
                                     missing_ok=bool(self.gitc_manifest))
diff --git a/subcmds/sync.py b/subcmds/sync.py
index df23034..9e4c775 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -217,7 +217,7 @@
     p.add_option('-l', '--local-only',
                  dest='local_only', action='store_true',
                  help="only update working tree, don't fetch")
-    p.add_option('--no-manifest-update','--nmu',
+    p.add_option('--no-manifest-update', '--nmu',
                  dest='mp_update', action='store_false', default='true',
                  help='use the existing manifest checkout as-is. '
                       '(do not update to the latest revision)')
@@ -1136,7 +1136,7 @@
     old = self._times.get(name, t)
     self._seen.add(name)
     a = self._ALPHA
-    self._times[name] = (a*t) + ((1-a) * old)
+    self._times[name] = (a * t) + ((1 - a) * old)
 
   def _Load(self):
     if self._times is None:
@@ -1208,7 +1208,7 @@
       if proxy:
         proxyhandler = urllib.request.ProxyHandler({
             "http": proxy,
-            "https": proxy })
+            "https": proxy})
 
       opener = urllib.request.build_opener(
           urllib.request.HTTPCookieProcessor(cookiejar),