Fix indentation issues reported by flake8

- E121 continuation line under-indented for hanging indent
- E122 continuation line missing indentation or outdented
- E125 continuation line with same indent as next logical line
- E126 continuation line over-indented for hanging indent
- E127 continuation line over-indented for visual indent
- E128 continuation line under-indented for visual indent
- E129 visually indented line with same indent as next logical line
- E131 continuation line unaligned for hanging indent

Fixed automatically with autopep8:

  git ls-files | grep py$ | xargs autopep8 --in-place \
    --select E121,E122,E125,E126,E127,E128,E129,E131

Change-Id: Ifd95fb8e6a1a4d6e9de187b5787d64a6326dd249
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254605
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: David Pursehouse <dpursehouse@collab.net>
diff --git a/editor.py b/editor.py
index fcf1638..6319ada 100644
--- a/editor.py
+++ b/editor.py
@@ -57,7 +57,7 @@
 
     if os.getenv('TERM') == 'dumb':
       print(
-"""No editor specified in GIT_EDITOR, core.editor, VISUAL or EDITOR.
+          """No editor specified in GIT_EDITOR, core.editor, VISUAL or EDITOR.
 Tried to fall back to vi but terminal is dumb.  Please configure at
 least one of these before using this command.""", file=sys.stderr)
       sys.exit(1)
@@ -104,10 +104,10 @@
         rc = subprocess.Popen(args, shell=shell).wait()
       except OSError as e:
         raise EditorError('editor failed, %s: %s %s'
-          % (str(e), editor, path))
+                          % (str(e), editor, path))
       if rc != 0:
         raise EditorError('editor failed with exit status %d: %s %s'
-          % (rc, editor, path))
+                          % (rc, editor, path))
 
       with open(path, mode='rb') as fd2:
         return fd2.read().decode('utf-8')
diff --git a/git_command.py b/git_command.py
index 5034ae1..df39ec0 100644
--- a/git_command.py
+++ b/git_command.py
@@ -57,16 +57,16 @@
     if not os.path.exists(tmp_dir):
       tmp_dir = tempfile.gettempdir()
     _ssh_sock_path = os.path.join(
-      tempfile.mkdtemp('', 'ssh-', tmp_dir),
-      'master-%r@%h:%p')
+        tempfile.mkdtemp('', 'ssh-', tmp_dir),
+        'master-%r@%h:%p')
   return _ssh_sock_path
 
 def _ssh_proxy():
   global _ssh_proxy_path
   if _ssh_proxy_path is None:
     _ssh_proxy_path = os.path.join(
-      os.path.dirname(__file__),
-      'git_ssh')
+        os.path.dirname(__file__),
+        'git_ssh')
   return _ssh_proxy_path
 
 def _add_ssh_client(p):
diff --git a/git_config.py b/git_config.py
index 6b47456..13fbda2 100644
--- a/git_config.py
+++ b/git_config.py
@@ -104,8 +104,8 @@
     self._json = jsonFile
     if self._json is None:
       self._json = os.path.join(
-        os.path.dirname(self.file),
-        '.repo_' + os.path.basename(self.file) + '.json')
+          os.path.dirname(self.file),
+          '.repo_' + os.path.basename(self.file) + '.json')
 
   def Has(self, name, include_defaults=True):
     """Return true if this configuration file has the key.
@@ -269,7 +269,7 @@
   def _ReadJson(self):
     try:
       if os.path.getmtime(self._json) \
-      <= os.path.getmtime(self.file):
+              <= os.path.getmtime(self.file):
         platform_utils.remove(self._json)
         return None
     except OSError:
@@ -422,16 +422,16 @@
       return True
 
     if not _ssh_master \
-    or 'GIT_SSH' in os.environ \
-    or sys.platform in ('win32', 'cygwin'):
+            or 'GIT_SSH' in os.environ \
+            or sys.platform in ('win32', 'cygwin'):
       # failed earlier, or cygwin ssh can't do this
       #
       return False
 
     # We will make two calls to ssh; this is the common part of both calls.
     command_base = ['ssh',
-                     '-o', 'ControlPath %s' % ssh_sock(),
-                     host]
+                    '-o', 'ControlPath %s' % ssh_sock(),
+                    host]
     if port is not None:
       command_base[1:1] = ['-p', str(port)]
 
@@ -465,7 +465,7 @@
     except Exception as e:
       _ssh_master = False
       print('\nwarn: cannot enable ssh control master for %s:%s\n%s'
-             % (host, port, str(e)), file=sys.stderr)
+            % (host, port, str(e)), file=sys.stderr)
       return False
 
     time.sleep(1)
@@ -583,7 +583,7 @@
     self.review = self._Get('review')
     self.projectname = self._Get('projectname')
     self.fetch = list(map(RefSpec.FromString,
-                      self._Get('fetch', all_keys=True)))
+                          self._Get('fetch', all_keys=True)))
     self._review_url = None
 
   def _InsteadOf(self):
@@ -598,7 +598,7 @@
 
       for insteadOf in insteadOfList:
         if self.url.startswith(insteadOf) \
-        and len(insteadOf) > len(longest):
+                and len(insteadOf) > len(longest):
           longest = insteadOf
           longestUrl = url
 
diff --git a/gitc_utils.py b/gitc_utils.py
index a2b04d9..45920b0 100644
--- a/gitc_utils.py
+++ b/gitc_utils.py
@@ -52,7 +52,7 @@
                                        project.remote.url,
                                        project.revisionExpr],
                                       capture_stdout=True, cwd='/tmp'))
-      for project in projects if not git_config.IsId(project.revisionExpr)]
+                     for project in projects if not git_config.IsId(project.revisionExpr)]
   for proj, gitcmd in project_gitcmds:
     if gitcmd.Wait():
       print('FATAL: Failed to retrieve revisionExpr for %s' % proj)
diff --git a/main.py b/main.py
index 7dbdbfa..7724a76 100755
--- a/main.py
+++ b/main.py
@@ -188,7 +188,7 @@
       copts = cmd.ReadEnvironmentOptions(copts)
     except NoManifestException as e:
       print('error: in `%s`: %s' % (' '.join([name] + argv), str(e)),
-        file=sys.stderr)
+            file=sys.stderr)
       print('error: manifest missing or unreadable -- please run init',
             file=sys.stderr)
       return 1
@@ -211,9 +211,9 @@
       cmd.ValidateOptions(copts, cargs)
       result = cmd.Execute(copts, cargs)
     except (DownloadError, ManifestInvalidRevisionError,
-        NoManifestException) as e:
+            NoManifestException) as e:
       print('error: in `%s`: %s' % (' '.join([name] + argv), str(e)),
-        file=sys.stderr)
+            file=sys.stderr)
       if isinstance(e, NoManifestException):
         print('error: manifest missing or unreadable -- please run init',
               file=sys.stderr)
@@ -346,7 +346,7 @@
   def http_error_401(self, req, fp, code, msg, headers):
     _AddPasswordFromUserInput(self, msg, req)
     return urllib.request.HTTPBasicAuthHandler.http_error_401(
-      self, req, fp, code, msg, headers)
+        self, req, fp, code, msg, headers)
 
   def http_error_auth_reqed(self, authreq, host, req, headers):
     try:
@@ -356,7 +356,7 @@
         old_add_header(name, val)
       req.add_header = _add_header
       return urllib.request.AbstractBasicAuthHandler.http_error_auth_reqed(
-        self, authreq, host, req, headers)
+          self, authreq, host, req, headers)
     except:
       reset = getattr(self, 'reset_retry_count', None)
       if reset is not None:
@@ -369,7 +369,7 @@
   def http_error_401(self, req, fp, code, msg, headers):
     _AddPasswordFromUserInput(self, msg, req)
     return urllib.request.HTTPDigestAuthHandler.http_error_401(
-      self, req, fp, code, msg, headers)
+        self, req, fp, code, msg, headers)
 
   def http_error_auth_reqed(self, auth_header, host, req, headers):
     try:
@@ -379,7 +379,7 @@
         old_add_header(name, val)
       req.add_header = _add_header
       return urllib.request.AbstractDigestAuthHandler.http_error_auth_reqed(
-        self, auth_header, host, req, headers)
+          self, auth_header, host, req, headers)
     except:
       reset = getattr(self, 'reset_retry_count', None)
       if reset is not None:
@@ -406,7 +406,7 @@
 
       if self.retried > 3:
         raise urllib.request.HTTPError(req.get_full_url(), 401,
-          "Negotiate auth failed", headers, None)
+                                       "Negotiate auth failed", headers, None)
       else:
         self.retried += 1
 
diff --git a/manifest_xml.py b/manifest_xml.py
index 9df03c0..fd0e4f1 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -140,12 +140,12 @@
     self._load_local_manifests = True
 
     self.repoProject = MetaProject(self, 'repo',
-      gitdir=os.path.join(repodir, 'repo/.git'),
-      worktree=os.path.join(repodir, 'repo'))
+                                   gitdir=os.path.join(repodir, 'repo/.git'),
+                                   worktree=os.path.join(repodir, 'repo'))
 
     self.manifestProject = MetaProject(self, 'manifests',
-      gitdir=os.path.join(repodir, 'manifests.git'),
-      worktree=os.path.join(repodir, 'manifests'))
+                                       gitdir=os.path.join(repodir, 'manifests.git'),
+                                       worktree=os.path.join(repodir, 'manifests'))
 
     self._Unload()
 
@@ -462,12 +462,12 @@
             self.localManifestWarning = True
             print('warning: %s is deprecated; put local manifests '
                   'in `%s` instead' % (LOCAL_MANIFEST_NAME,
-                  os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)),
+                                       os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)),
                   file=sys.stderr)
           nodes.append(self._ParseManifestXml(local, self.repodir))
 
         local_dir = os.path.abspath(os.path.join(self.repodir,
-                                    LOCAL_MANIFESTS_DIR_NAME))
+                                                 LOCAL_MANIFESTS_DIR_NAME))
         try:
           for local_file in sorted(platform_utils.listdir(local_dir)):
             if local_file.endswith('.xml'):
@@ -512,7 +512,7 @@
         fp = os.path.join(include_root, name)
         if not os.path.isfile(fp):
           raise ManifestParseError("include %s doesn't exist or isn't a file"
-              % (name,))
+                                   % (name,))
         try:
           nodes.extend(self._ParseManifestXml(fp, include_root))
         # should isolate this to the exact exception, but that's
@@ -811,21 +811,21 @@
       remote = self._default.remote
     if remote is None:
       raise ManifestParseError("no remote for project %s within %s" %
-            (name, self.manifestFile))
+                               (name, self.manifestFile))
 
     revisionExpr = node.getAttribute('revision') or remote.revision
     if not revisionExpr:
       revisionExpr = self._default.revisionExpr
     if not revisionExpr:
       raise ManifestParseError("no revision for project %s within %s" %
-            (name, self.manifestFile))
+                               (name, self.manifestFile))
 
     path = node.getAttribute('path')
     if not path:
       path = name
     if path.startswith('/'):
       raise ManifestParseError("project %s path cannot be absolute in %s" %
-            (name, self.manifestFile))
+                               (name, self.manifestFile))
 
     rebase = node.getAttribute('rebase')
     if not rebase:
@@ -1054,7 +1054,7 @@
       keep = "true"
     if keep != "true" and keep != "false":
       raise ManifestParseError('optional "keep" attribute must be '
-            '"true" or "false"')
+                               '"true" or "false"')
     project.AddAnnotation(name, value, keep)
 
   def _get_remote(self, node):
@@ -1065,7 +1065,7 @@
     v = self._remotes.get(name)
     if not v:
       raise ManifestParseError("remote %s not defined in %s" %
-            (name, self.manifestFile))
+                               (name, self.manifestFile))
     return v
 
   def _reqatt(self, node, attname):
@@ -1075,7 +1075,7 @@
     v = node.getAttribute(attname)
     if not v:
       raise ManifestParseError("no %s in <%s> within %s" %
-            (attname, node.nodeName, self.manifestFile))
+                               (attname, node.nodeName, self.manifestFile))
     return v
 
   def projectsDiff(self, manifest):
diff --git a/progress.py b/progress.py
index d2ed4ba..8a643db 100644
--- a/progress.py
+++ b/progress.py
@@ -53,9 +53,9 @@
 
     if self._total <= 0:
       sys.stderr.write('%s\r%s: %d,' % (
-        CSI_ERASE_LINE,
-        self._title,
-        self._done))
+          CSI_ERASE_LINE,
+          self._title,
+          self._done))
       sys.stderr.flush()
     else:
       p = (100 * self._done) / self._total
@@ -63,13 +63,13 @@
       if self._lastp != p or self._always_print_percentage:
         self._lastp = p
         sys.stderr.write('%s\r%s: %3d%% (%d%s/%d%s)%s%s%s' % (
-          CSI_ERASE_LINE,
-          self._title,
-          p,
-          self._done, self._units,
-          self._total, self._units,
-          ' ' if msg else '', msg,
-          "\n" if self._print_newline else ""))
+            CSI_ERASE_LINE,
+            self._title,
+            p,
+            self._done, self._units,
+            self._total, self._units,
+            ' ' if msg else '', msg,
+            "\n" if self._print_newline else ""))
         sys.stderr.flush()
 
   def end(self):
@@ -78,16 +78,16 @@
 
     if self._total <= 0:
       sys.stderr.write('%s\r%s: %d, done.\n' % (
-        CSI_ERASE_LINE,
-        self._title,
-        self._done))
+          CSI_ERASE_LINE,
+          self._title,
+          self._done))
       sys.stderr.flush()
     else:
       p = (100 * self._done) / self._total
       sys.stderr.write('%s\r%s: %3d%% (%d%s/%d%s), done.\n' % (
-        CSI_ERASE_LINE,
-        self._title,
-        p,
-        self._done, self._units,
-        self._total, self._units))
+          CSI_ERASE_LINE,
+          self._title,
+          p,
+          self._done, self._units,
+          self._total, self._units))
       sys.stderr.flush()
diff --git a/project.py b/project.py
index 382650f..8c56af4 100644
--- a/project.py
+++ b/project.py
@@ -2341,7 +2341,7 @@
     else:
       branch = self.revisionExpr
     if (not self.manifest.IsMirror and is_sha1 and depth
-        and git_require((1, 8, 3))):
+            and git_require((1, 8, 3))):
       # Shallow checkout of a specific commit, fetch from that commit and not
       # the heads only as the commit might be deeper in the history.
       spec.append(branch)
diff --git a/subcmds/__init__.py b/subcmds/__init__.py
index 2734103..9cc9471 100644
--- a/subcmds/__init__.py
+++ b/subcmds/__init__.py
@@ -40,7 +40,7 @@
       cmd = getattr(mod, clsn)()
     except AttributeError:
       raise SyntaxError('%s/%s does not define class %s' % (
-                         __name__, py, clsn))
+          __name__, py, clsn))
 
     name = name.replace('_', '-')
     cmd.NAME = name
diff --git a/subcmds/abandon.py b/subcmds/abandon.py
index ba4ef09..9a645c0 100644
--- a/subcmds/abandon.py
+++ b/subcmds/abandon.py
@@ -95,5 +95,5 @@
           result = "all project"
         else:
           result = "%s" % (
-            ('\n' + ' ' * width + '| ').join(p.relpath for p in success[br]))
+              ('\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/forall.py b/subcmds/forall.py
index 9706760..5d2be91 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -28,10 +28,10 @@
 import platform_utils
 
 _CAN_COLOR = [
-  'branch',
-  'diff',
-  'grep',
-  'log',
+    'branch',
+    'diff',
+    'grep',
+    'log',
 ]
 
 
@@ -170,14 +170,14 @@
     else:
       lrev = None
     return {
-      'name': project.name,
-      'relpath': project.relpath,
-      'remote_name': project.remote.name,
-      'lrev': lrev,
-      'rrev': project.revisionExpr,
-      'annotations': dict((a.name, a.value) for a in project.annotations),
-      'gitdir': project.gitdir,
-      'worktree': project.worktree,
+        'name': project.name,
+        'relpath': project.relpath,
+        'remote_name': project.remote.name,
+        'lrev': lrev,
+        'rrev': project.revisionExpr,
+        'annotations': dict((a.name, a.value) for a in project.annotations),
+        'gitdir': project.gitdir,
+        'worktree': project.worktree,
     }
 
   def ValidateOptions(self, opt, args):
@@ -196,8 +196,8 @@
     cmd.extend(opt.command[1:])
 
     if opt.project_header \
-    and not shell \
-    and cmd[0] == 'git':
+            and not shell \
+            and cmd[0] == 'git':
       # If this is a direct git command that can enable colorized
       # output and the user prefers coloring, add --color into the
       # command line because we are going to wrap the command into
@@ -220,7 +220,7 @@
 
     smart_sync_manifest_name = "smart_sync_override.xml"
     smart_sync_manifest_path = os.path.join(
-      self.manifest.manifestProject.worktree, smart_sync_manifest_name)
+        self.manifest.manifestProject.worktree, smart_sync_manifest_name)
 
     if os.path.isfile(smart_sync_manifest_path):
       self.manifest.Override(smart_sync_manifest_path)
@@ -238,8 +238,8 @@
     try:
       config = self.manifest.manifestProject.config
       results_it = pool.imap(
-         DoWorkWrapper,
-         self.ProjectArgs(projects, mirror, opt, cmd, shell, config))
+          DoWorkWrapper,
+          self.ProjectArgs(projects, mirror, opt, cmd, shell, config))
       pool.close()
       for r in results_it:
         rc = rc or r
@@ -253,7 +253,7 @@
     except Exception as e:
       # Catch any other exceptions raised
       print('Got an error, terminating the pool: %s: %s' %
-              (type(e).__name__, e),
+            (type(e).__name__, e),
             file=sys.stderr)
       pool.terminate()
       rc = rc or getattr(e, 'errno', 1)
@@ -268,7 +268,7 @@
         project = self._SerializeProject(p)
       except Exception as e:
         print('Project list error on project %s: %s: %s' %
-                (p.name, type(e).__name__, e),
+              (p.name, type(e).__name__, e),
               file=sys.stderr)
         return
       except KeyboardInterrupt:
@@ -331,7 +331,7 @@
     if opt.ignore_missing:
       return 0
     if ((opt.project_header and opt.verbose)
-        or not opt.project_header):
+            or not opt.project_header):
       print('skipping %s/' % project['relpath'], file=sys.stderr)
     return 1
 
diff --git a/subcmds/help.py b/subcmds/help.py
index 7893050..93b9a86 100644
--- a/subcmds/help.py
+++ b/subcmds/help.py
@@ -72,13 +72,13 @@
       return False
 
     commandNames = list(sorted([name
-                    for name, command in self.commands.items()
-                    if command.common and gitc_supported(command)]))
+                                for name, command in self.commands.items()
+                                if command.common and gitc_supported(command)]))
     self._PrintCommands(commandNames)
 
     print(
-"See 'repo help <command>' for more information on a specific command.\n"
-"See 'repo help --all' for a complete list of recognized commands.")
+        "See 'repo help <command>' for more information on a specific command.\n"
+        "See 'repo help --all' for a complete list of recognized commands.")
 
   def _PrintCommandHelp(self, cmd, header_prefix=''):
     class _Out(Coloring):
diff --git a/subcmds/info.py b/subcmds/info.py
index a6faf16..96fa6a4 100644
--- a/subcmds/info.py
+++ b/subcmds/info.py
@@ -195,11 +195,11 @@
       commits = branch.commits
       date = branch.date
       self.text('%s %-33s (%2d commit%s, %s)' % (
-        branch.name == project.CurrentBranch and '*' or ' ',
-        branch.name,
-        len(commits),
-        len(commits) != 1 and 's' or '',
-        date))
+          branch.name == project.CurrentBranch and '*' or ' ',
+          branch.name,
+          len(commits),
+          len(commits) != 1 and 's' or '',
+          date))
       self.out.nl()
 
       for commit in commits:
diff --git a/subcmds/init.py b/subcmds/init.py
index 191f02b..7181b86 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -223,7 +223,7 @@
     platformize = lambda x: 'platform-' + x
     if opt.platform == 'auto':
       if (not opt.mirror and
-          not m.config.GetString('repo.mirror') == 'true'):
+              not m.config.GetString('repo.mirror') == 'true'):
         groups.append(platformize(platform.system().lower()))
     elif opt.platform == 'all':
       groups.extend(map(platformize, all_platforms))
@@ -280,10 +280,10 @@
       m.config.SetString('repo.submodules', 'true')
 
     if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet,
-        clone_bundle=not opt.no_clone_bundle,
-        current_branch_only=opt.current_branch_only,
-        no_tags=opt.no_tags, submodules=opt.submodules,
-        clone_filter=opt.clone_filter):
+                              clone_bundle=not opt.no_clone_bundle,
+                              current_branch_only=opt.current_branch_only,
+                              no_tags=opt.no_tags, submodules=opt.submodules,
+                              clone_filter=opt.clone_filter):
       r = m.GetRemote(m.remote.name)
       print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr)
 
diff --git a/subcmds/rebase.py b/subcmds/rebase.py
index dcb8b2a..eb92a3c 100644
--- a/subcmds/rebase.py
+++ b/subcmds/rebase.py
@@ -43,8 +43,8 @@
 
   def _Options(self, p):
     p.add_option('-i', '--interactive',
-                dest="interactive", action="store_true",
-                help="interactive rebase (single project only)")
+                 dest="interactive", action="store_true",
+                 help="interactive rebase (single project only)")
 
     p.add_option('--fail-fast',
                  dest='fail_fast', action='store_true',
@@ -82,7 +82,7 @@
             file=sys.stderr)
       if len(args) == 1:
         print('note: project %s is mapped to more than one path' % (args[0],),
-            file=sys.stderr)
+              file=sys.stderr)
       return 1
 
     # Setup the common git rebase args that we use for all projects.
diff --git a/subcmds/start.py b/subcmds/start.py
index 9b81086..f98f790 100644
--- a/subcmds/start.py
+++ b/subcmds/start.py
@@ -113,7 +113,7 @@
           branch_merge = self.manifest.default.revisionExpr
 
       if not project.StartBranch(
-          nb, branch_merge=branch_merge, revision=opt.revision):
+              nb, branch_merge=branch_merge, revision=opt.revision):
         err.append(project)
     pm.end()
 
diff --git a/subcmds/status.py b/subcmds/status.py
index 6012ae2..a04ba92 100644
--- a/subcmds/status.py
+++ b/subcmds/status.py
@@ -126,8 +126,8 @@
         continue
       if item in proj_dirs_parents:
         self._FindOrphans(glob.glob('%s/.*' % item) +
-            glob.glob('%s/*' % item),
-            proj_dirs, proj_dirs_parents, outstring)
+                          glob.glob('%s/*' % item),
+                          proj_dirs, proj_dirs_parents, outstring)
         continue
       outstring.append(''.join([status_header, item, '/']))
 
@@ -179,8 +179,8 @@
 
         outstring = []
         self._FindOrphans(glob.glob('.*') +
-            glob.glob('*'),
-            proj_dirs, proj_dirs_parents, outstring)
+                          glob.glob('*'),
+                          proj_dirs, proj_dirs_parents, outstring)
 
         if outstring:
           output = StatusColoring(self.manifest.globalConfig)
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 9e4c775..1ea102c 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -327,14 +327,14 @@
     try:
       try:
         success = project.Sync_NetworkHalf(
-          quiet=opt.quiet,
-          current_branch_only=opt.current_branch_only,
-          force_sync=opt.force_sync,
-          clone_bundle=not opt.no_clone_bundle,
-          no_tags=opt.no_tags, archive=self.manifest.IsArchive,
-          optimized_fetch=opt.optimized_fetch,
-          prune=opt.prune,
-          clone_filter=clone_filter)
+            quiet=opt.quiet,
+            current_branch_only=opt.current_branch_only,
+            force_sync=opt.force_sync,
+            clone_bundle=not opt.no_clone_bundle,
+            no_tags=opt.no_tags, archive=self.manifest.IsArchive,
+            optimized_fetch=opt.optimized_fetch,
+            prune=opt.prune,
+            clone_filter=clone_filter)
         self._fetch_times.Set(project, time.time() - start)
 
         # Lock around all the rest of the code, since printing, updating a set
@@ -356,7 +356,7 @@
         pass
       except Exception as e:
         print('error: Cannot fetch %s (%s: %s)'
-            % (project.name, type(e).__name__, str(e)), file=sys.stderr)
+              % (project.name, type(e).__name__, str(e)), file=sys.stderr)
         err_event.set()
         raise
     finally:
@@ -704,16 +704,16 @@
           gitdir = os.path.join(self.manifest.topdir, path, '.git')
           if os.path.exists(gitdir):
             project = Project(
-                           manifest=self.manifest,
-                           name=path,
-                           remote=RemoteSpec('origin'),
-                           gitdir=gitdir,
-                           objdir=gitdir,
-                           worktree=os.path.join(self.manifest.topdir, path),
-                           relpath=path,
-                           revisionExpr='HEAD',
-                           revisionId=None,
-                           groups=None)
+                manifest=self.manifest,
+                name=path,
+                remote=RemoteSpec('origin'),
+                gitdir=gitdir,
+                objdir=gitdir,
+                worktree=os.path.join(self.manifest.topdir, path),
+                relpath=path,
+                revisionExpr='HEAD',
+                revisionId=None,
+                groups=None)
 
             if project.IsDirty() and opt.force_remove_dirty:
               print('WARNING: Removing dirty project "%s": uncommitted changes '
@@ -885,7 +885,7 @@
 
     manifest_name = opt.manifest_name
     smart_sync_manifest_path = os.path.join(
-      self.manifest.manifestProject.worktree, 'smart_sync_override.xml')
+        self.manifest.manifestProject.worktree, 'smart_sync_override.xml')
 
     if opt.smart_sync or opt.smart_tag:
       manifest_name = self._SmartSyncSetup(opt, smart_sync_manifest_path)
diff --git a/subcmds/upload.py b/subcmds/upload.py
index c0f870e..180496f 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -218,10 +218,10 @@
       print('Upload project %s/ to remote branch %s%s:' %
             (project.relpath, destination, ' (draft)' if opt.draft else ''))
       print('  branch %s (%2d commit%s, %s):' % (
-                    name,
-                    len(commit_list),
-                    len(commit_list) != 1 and 's' or '',
-                    date))
+          name,
+          len(commit_list),
+          len(commit_list) != 1 and 's' or '',
+          date))
       for commit in commit_list:
         print('         %s' % commit)
 
@@ -422,18 +422,18 @@
           else:
             fmt = '\n       (%s)'
           print(('[FAILED] %-15s %-15s' + fmt) % (
-                 branch.project.relpath + '/',
-                 branch.name,
-                 str(branch.error)),
-                 file=sys.stderr)
+              branch.project.relpath + '/',
+              branch.name,
+              str(branch.error)),
+              file=sys.stderr)
       print()
 
     for branch in todo:
       if branch.uploaded:
         print('[OK    ] %-15s %s' % (
-               branch.project.relpath + '/',
-               branch.name),
-               file=sys.stderr)
+            branch.project.relpath + '/',
+            branch.name),
+            file=sys.stderr)
 
     if have_errors:
       sys.exit(1)