git_config: Stop using backslash to wrap lines
Unwrap one unnecessarily wrapped line, and use parentheses on
a wrapped condition instead of wrapping with backslashes.
Change-Id: I12679a0547dd822b15a6551e0f6c308239ff7b2d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254607
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 5fb61d2..054f5c6 100644
--- a/git_config.py
+++ b/git_config.py
@@ -274,8 +274,7 @@
def _ReadJson(self):
try:
- if os.path.getmtime(self._json) \
- <= os.path.getmtime(self.file):
+ if os.path.getmtime(self._json) <= os.path.getmtime(self.file):
platform_utils.remove(self._json)
return None
except OSError:
@@ -429,9 +428,9 @@
if key in _master_keys:
return True
- if not _ssh_master \
- or 'GIT_SSH' in os.environ \
- or sys.platform in ('win32', 'cygwin'):
+ if (not _ssh_master
+ or 'GIT_SSH' in os.environ
+ or sys.platform in ('win32', 'cygwin')):
# failed earlier, or cygwin ssh can't do this
#
return False
@@ -612,8 +611,8 @@
insteadOfList = globCfg.GetString(key, all_keys=True)
for insteadOf in insteadOfList:
- if self.url.startswith(insteadOf) \
- and len(insteadOf) > len(longest):
+ if (self.url.startswith(insteadOf)
+ and len(insteadOf) > len(longest)):
longest = insteadOf
longestUrl = url