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/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