git-p4: remove extraneous spaces before function arguments

PEP8 recommends that there should be no spaces before function arguments
in the in the "Pet Peeves" section:

https://www.python.org/dev/peps/pep-0008/#pet-peeves

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Joel Holdsworth
2022-04-01 15:24:54 +01:00
committed by Junio C Hamano
parent 12a77f5b7e
commit 843d847ff7

View File

@ -911,16 +911,16 @@ def extractSettingsGitLog(log):
values = {} values = {}
for line in log.split("\n"): for line in log.split("\n"):
line = line.strip() line = line.strip()
m = re.search (r"^ *\[git-p4: (.*)\]$", line) m = re.search(r"^ *\[git-p4: (.*)\]$", line)
if not m: if not m:
continue continue
assignments = m.group(1).split (':') assignments = m.group(1).split(':')
for a in assignments: for a in assignments:
vals = a.split ('=') vals = a.split('=')
key = vals[0].strip() key = vals[0].strip()
val = ('='.join (vals[1:])).strip() val = ('='.join(vals[1:])).strip()
if val.endswith ('\"') and val.startswith('"'): if val.endswith('\"') and val.startswith('"'):
val = val[1:-1] val = val[1:-1]
values[key] = val values[key] = val
@ -2275,9 +2275,9 @@ class P4Submit(Command, P4UserMap):
# Revert changes if we skip this patch # Revert changes if we skip this patch
if not submitted or self.shelve: if not submitted or self.shelve:
if self.shelve: if self.shelve:
print ("Reverting shelved files.") print("Reverting shelved files.")
else: else:
print ("Submission cancelled, undoing p4 changes.") print("Submission cancelled, undoing p4 changes.")
sys.stdout.flush() sys.stdout.flush()
for f in editedFiles | filesToDelete: for f in editedFiles | filesToDelete:
p4_revert(f) p4_revert(f)
@ -3948,7 +3948,7 @@ class P4Sync(Command, P4UserMap):
i = i - 1 i = i - 1
break break
paths.append ("/".join(cur_list[:i + 1])) paths.append("/".join(cur_list[:i + 1]))
self.previousDepotPaths = paths self.previousDepotPaths = paths
@ -3977,8 +3977,8 @@ class P4Sync(Command, P4UserMap):
else: else:
if self.depotPaths and self.depotPaths != args: if self.depotPaths and self.depotPaths != args:
print("previous import used depot path %s and now %s was specified. " print("previous import used depot path %s and now %s was specified. "
"This doesn't work!" % (' '.join (self.depotPaths), "This doesn't work!" % (' '.join(self.depotPaths),
' '.join (args))) ' '.join(args)))
sys.exit(1) sys.exit(1)
self.depotPaths = sorted(args) self.depotPaths = sorted(args)
@ -4018,7 +4018,7 @@ class P4Sync(Command, P4UserMap):
if len(self.changesFile) == 0: if len(self.changesFile) == 0:
revision = "#head" revision = "#head"
p = re.sub ("\.\.\.$", "", p) p = re.sub("\.\.\.$", "", p)
if not p.endswith("/"): if not p.endswith("/"):
p += "/" p += "/"