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/git_config.py b/git_config.py
index 8311d9f..8cc52da 100644
--- a/git_config.py
+++ b/git_config.py
@@ -75,7 +75,7 @@
parts = name.split('.')
if len(parts) < 2:
return name.lower()
- parts[ 0] = parts[ 0].lower()
+ parts[0] = parts[0].lower()
parts[-1] = parts[-1].lower()
return '.'.join(parts)
@@ -430,7 +430,7 @@
# We will make two calls to ssh; this is the common part of both calls.
command_base = ['ssh',
- '-o','ControlPath %s' % ssh_sock(),
+ '-o', 'ControlPath %s' % ssh_sock(),
host]
if port is not None:
command_base[1:1] = ['-p', str(port)]
@@ -439,13 +439,13 @@
# ...but before actually starting a master, we'll double-check. This can
# be important because we can't tell that that 'git@myhost.com' is the same
# as 'myhost.com' where "User git" is setup in the user's ~/.ssh/config file.
- check_command = command_base + ['-O','check']
+ check_command = command_base + ['-O', 'check']
try:
Trace(': %s', ' '.join(check_command))
check_process = subprocess.Popen(check_command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- check_process.communicate() # read output, but ignore it...
+ check_process.communicate() # read output, but ignore it...
isnt_running = check_process.wait()
if not isnt_running:
@@ -467,7 +467,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)